Jump to content

OPEN_SEQUENCE_TASK, is there anyway to use anything other than 0 as placeholder?


 Share

Recommended Posts

Hello to whoever is reading this,

 

I have an issue with a OPEN_SEQUENCE_TASK related task. I am trying to make a PED do a specific set of actions after each other. For I tried to use the OPEN_SEQUENCE_TASK feature. Howver after a time the game no longer recognizes the PED who is referred to 0 or something. The PED will no longer do what he's supposed to do unless I change the 0 to it's name. However if I do that I can no longer run the actions after each other, now the PED will only do the last set action. Could someone help me with finding a way around this?

 

Here's the part of the code I am referring to:


                Object seq;
                AI::OPEN_SEQUENCE_TASK(&seq);
                AI::_0x92DB0739813C5186(target, horse, -1, -1, 2.0f, 1, 0, 0); // Mount the horse
                AI::_0xFD45175A6DFD7CE9(target, player, 3, 0, -999.0f, -1, 0); // FLEE
                AI::CLOSE_SEQUENCE_TASK(seq);

                AI::CLEAR_PED_TASKS(target, 1, 1);
                AI::TASK_PERFORM_SEQUENCE(target, seq);

Link to comment
Share on other sites

That behavior sounds more like you are reaching some internal task sequence/pool limit. Have you tried using this right after performing the sequence to free it?

 

  • Like 2
Link to comment
Share on other sites

22 minutes ago, LMS said:

That behavior sounds more like you are reaching some internal task sequence/pool limit. Have you tried using this right after performing the sequence to free it?

 

Okay dude, I cannot express my gratitude to you on this one, it finally works now. I was stuck on this for so damn long XD. You're the best!!

Edited by DoctorBones
  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...