0

How do I stop all things that is happening in one state and transit to another state?

Surrealism 2 months ago updated 2 months ago 1

I'm trying to get my enemy AI to move around for a few seconds, then immediately transit to attack the player and then a few seconds later wander around the level. 

But currently, the wandering navmesh overlaps the attack after the second transition which resulted in the character "floating", for example, the character is trying to move to another point but it is still looking at the player while moving. I would like the character to look at where its walking then stop, then turn to player and attack, rinse and repeat.

Is there any function to kill the previous state completely and transit to the other state? Thank you in advance!!

Bolt Version:
Unity Version:
2019.2.1f1
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):

Solved, I plug the units into On Enter State instead of Update, this will ensure the State only runs once so it wont overlap with the other states