When you play video games, you can create movements for the main character so the player can move by using the Keyboard, Gamepad, the mouse etc...But how can we create the moved for the opponent who are attacking your character in the game (the CPU)? Explain that to me!
Thank you!
Develop games in your browser. Powerful, performant & highly capable.
You have to decide yourself, as a designer, how you want the enemy to move.
Answer the questions: Where/how should the enemy move (actions), and when/why the enemy moves (conditions).
Use the answers to put together your events.