Hello everyone! I have problems with using OPEN_SEQUENCE_TASK/CLOSE_SEQUENCE_TASK/TASK_PERFORM_SEQUENCE/CLEAR_SEQUENCE_TASK in my client-side plugin. When im trying to use OPEN_SEQUENCE_TASK i get error:
InvokeNative: execution failed: Error executing native 0xe8854a4326b9e12b at address 0x140cfead2
I need to use this natives for animation script. This is trouble part of it:
int zero = 0;
var sequence = Function.Call<int>(Hash.OPEN_SEQUENCE_TASK, zero); <== ERROR
Function.Call(Hash.TASK_PLAY_ANIM, bla bla bla);
Function.Call(Hash.CLOSE_SEQUENCE_TASK, sequence);
Hereâs a basic example but it does not use Function.Call.
You have to create your task sequence first, then add animations to it, and finally perform that sequence on a PED where applicable.
Not sure I understand what you mean by âAdvanced Animationâ.
.AddTask.PlayAnimation() has 4 overloads where you can change things like the blend in, blend out, duration, animation flags, and play back rate if thatâs what you mean by âadvancedâ.
It doesnât look like you can use that in sequence, however when looking at the native the only added options it has that donât exist in at least one of the PlayAnimation() overloads is the x, y, z coords which documentation states will just teleport the PED to those coords before playing the animation. You can just script that part yourself to either teleport them or task them to go to, walk to, run to, etc, if they are close to the coord anyways. Then wait until they are at that coord and start the sequence. Likewise you can also change the ped heading, etc, once they get to the coord or use task look at, etc.