I've been having trouble getting the enemies in my game to attack properly. I've solved a lot of issues by looking at similar questions here on the forum but I still have one problem; They all attack at the same time. The event actions trigger for every instance that meets the conditions.
Here's a couple of screenshots:
I have an instance variable on the enemies called Enemy_State which controls their movement and also has the attack actions. The player has a hitbox pinned to them and when the enemy overlaps the hitbox their state changes to attack and they spawn another hitbox that hurts the player before being destroyed. All these damage hitboxes spawn at the same time and the player takes loads of damage suddenly. I want the attacks to be independent.
Is there any way to have the picked instances carry out the event actions independently?
Things like event 26 won't work. Use a timer on the object, to get individually timed actions.
Thanks for the response but how do you add a timer to an object? I'm not sure what you mean.
It's a behaviour.
Develop games in your browser. Powerful, performant & highly capable.
Thank you! Figured it out, it's working pretty well now.