From SRB2 Wiki
Jump to: navigation, search

A_SkullAttack is the standard attack of the Lost Souls from Doom, repurposed for use in SRB2. If a target is in range, the Object plays its ActiveSound and flies like a missile in a direction relative to it, depending on the value of Var1. If Var1 is 0, it will charge directly at the target; if set to 1, it dashes away from the target; if set to 2, it strafes relative to the target (randomly chooses between left or right). Var2 determines whether the actor will fly both vertically and horizontally (Var2 = 0), or just horizontally (Var2 = 1).

Unlike with actions such as A_Chase, A_SkullAttack doesn't need to be called repeatedly for most purposes – it gives the actor MF2_SKULLFLY, preventing the momentum given (a fixed speed of 20 fracunits/tic) from being lost until the actor crashes into an Object or wall (removing MF2_SKULLFLY), and allowing the actor to bounce off any floor/ceiling it hits. Exclusively for the Egg Mobile and custom Objects with MF_BOSS, the actor additionally spawns ghosts of itself.

Note: The Egg Mobile interprets this slightly differently, charging directly at the target, and dashing through them. This only works for the Egg Mobile, and should not be confused with the action's normal effect. Objects that desire this behavior should either replace the Egg Mobile Object itself, or toggle the flag MF_NOCLIPTHING (which will prevent it from ceasing the attack before colliding with the target, but, since it removes most collision checks against other Things, will also have its own side effects).

  Actions – Movement [view]