longshotsg
New member
Hi,
I was wondering what's the best practice to stop an ability that does for example clapping hands on the spot, if a lower priority left branch interrupts it.
Just a simple basic example, there are 4 branches under a sequence task.
In the 4th branch, it does 3 things.
1) Start clapping ability
2) Wait for 5 seconds
3) Stop clapping ability.
While in the 2nd task waiting for 5 seconds, a left lower priority branch (say branch 2) interrupts it, the ability will not be stopped and branch 2 will start to execute its child tasks.
Right now, I can put a stop ability(always success) as the first child tasks of EACH of the 3 branches to the left, but there should be a better way to do this?
It will get a lot messier if we have more abilities to start.
Things I have tried:
1) Add a check of "Moving is false" in the transition to the clapping animation but it doesn't work. As I wanted the ability to stop if it starts walking again.
2) Automatic stop type in the ability stops the ability almost immediately after it started.
Appreciate any help, thanks.
I was wondering what's the best practice to stop an ability that does for example clapping hands on the spot, if a lower priority left branch interrupts it.
Just a simple basic example, there are 4 branches under a sequence task.
In the 4th branch, it does 3 things.
1) Start clapping ability
2) Wait for 5 seconds
3) Stop clapping ability.
While in the 2nd task waiting for 5 seconds, a left lower priority branch (say branch 2) interrupts it, the ability will not be stopped and branch 2 will start to execute its child tasks.
Right now, I can put a stop ability(always success) as the first child tasks of EACH of the 3 branches to the left, but there should be a better way to do this?
It will get a lot messier if we have more abilities to start.
Things I have tried:
1) Add a check of "Moving is false" in the transition to the clapping animation but it doesn't work. As I wanted the ability to stop if it starts walking again.
2) Automatic stop type in the ability stops the ability almost immediately after it started.
Appreciate any help, thanks.