Originally Posted By: romin2011
Hello, my enemy comes out of cover after random seconds wait(-integer(random(10))). But wait stops the whole function animation etc for that amount of time.

Congratulations, you just discovered what wait does.
How should it know that the only thing you want is to preserve the current state but nothing else?
The solution: Wait only one frame but check every time if the 10 seconds have already passed, then trigger the state change of the ENTITY


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com