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);