Enemy Logic

Enemy logic covers movement, attacks, sounds, hit reactions and AI. Most of the fields are the same ones described in Player Logic — this page covers what is different when the character is hostile.

Enemy or Basic Enemy?

Entity Type offers both. The distinction is about role:

  • Basic Enemy — common, repeatable street enemies.
  • Enemy — tougher enemies and bosses.

This is not purely cosmetic. Some randomizers read the entity type to decide what to spawn where, so a boss marked as a basic enemy can end up appearing in crowds.

As with players, entity type normally comes from the reference character you chose at creation. Choosing the closest reference matters more for enemies than for players, because it also determines whether the animation names and behaviour modes line up with the role you intend.

Settings That Matter Most for Enemies

Enemies share the full set of movement, combat and sound settings with players. The ones that repay attention, especially for bosses and large enemies:

Setting Why it matters for enemies
Global body box, especially Depth A large enemy with a small box feels like it phases through attacks; with too much depth it becomes hittable from implausible distances. Depth decides lane alignment in a belt-scroller.
Grab Range, Front/Back Grab Offset Wrong offsets make a large enemy's grabs miss or clip into the player.
Knockdown Quake / Thrown Quake The main lever for making a heavy enemy feel heavy when it hits the floor.
Projectile Damage / Hit Pause Only if the enemy spawns projectiles.
Default sounds Hurt, attack, jump, landing and special sounds are what make an enemy readable in a crowd.

Building AI

There are two routes, and they are mutually exclusive per animation:

Logic events — move the enemy, change animation, spawn items, play audio, stop an action. Remember that adding any event to an animation switches off that animation's classic behaviour entirely; the events must then supply everything.

Behaviour overrides — point an animation at a classic entity and behaviour value, and the original controller drives it. This is how you get authentically classic-feeling enemy AI without rebuilding it.

Not every combination works. Behaviour values are tied to how the original game's code is structured, so a controller taken from one enemy may not make sense on another. See Behaviour Modes.

Testing

Enemies fail in ways that only appear in real fights. Test across difficulty levels and spawn modes, and specifically in crowds — an enemy that behaves well alone can lock up, refuse to approach, or stack badly with others.

Work incrementally: one change, then test. Enemy logic has a lot of interacting values and a big batch of changes is hard to unpick when the result is wrong.

Keep backups by copying character folders. Changes save immediately and automatically, so there is no unsaved state to fall back on if you take a wrong turn.

Related pages: Player Logic, The Inspector, Body and Hit Boxes, Logic Events, Behaviour Modes, Spawns.