How Do You Make an Enemy Attack in a Dragon Ball Z Game?

TIME : 2016-01-08
How Do You Make an Enemy Attack in a Dragon Ball Z Game?

Short answer: you have to build the behaviour yourself. An enemy does not attack because it exists on the screen; it attacks because you told it to.

In practice that means giving each opponent a simple state machine. Idle until the player enters a trigger zone, close the distance, then run an attack animation with a hitbox active for a few frames. Add a cooldown so it cannot chain attacks forever, and a chance to block or retreat so fights do not feel robotic.

Most engines ship with a behaviour or visual scripting tool that handles this without writing code from scratch, which is where I would start for a fan project.