Does anybody have any idea how to go about this?
So far I’m using semi-random patterns where enemies take either automatic (timer based) decisions to change their course within a random range, or reactive decisions based on distance to other objects (player, center of the screen, others).
But I’m completely at a loss regarding fixed movement patterns, much less when I’m also using physics (and I’m determined to use the physics engine).
Timer over T, do move A; time over T+1, do move B, (…) time over T+n do move Z and reset timer.
Activate enemy, set state 1. If in state 1, trigger move A once and set state 2. If in state 2, trigger move B once and set state 3. (…) If in state N, trigger move Z once and set state 1.
Record position, move. When actual position falls within a range from recorded position, record position again, move, repeat.
Would states need timers anyways?
Is any of these approaches more tractable to GDevelop’s event sheet conditions and advanced conditions?
Is any of these approaches inherently more or less efficient for some reason?
Is there any other approach I’m overlooking?