- The enemy will continuously chase the player when the player is within its sight range.
- When the enemy gets close to the player, it will jump to the player's position and deal 10-15 damage.
- After that, the enemy will take two steps back and wait for a moment.
- Repeat the cycle.
Explanation: We will loop the condition such that if this event is within 4 tiles of the player, it will jump to the player's position and create a dynamic self-destruct event that lasts for 3 frames with the notetags <dmg: 10 - 15> and <enemyHitbox>. Naturally, we would need a comment event to check for collisions between the player and events with the notetag <enemyHitbox> running in parallel. This is similar to what you've read in the previous tutorials. Then, we will break the loop. If the condition isn't met, we'll have the enemy move towards the player until it is.
The event then moves back two steps and waits for 80 frames before repeating the entire action.