From SRB2 Wiki
Jump to navigation Jump to search
This article or section is outdated and has not been fully updated to reflect the current version of SRB2.

Please help the Wiki by correcting or removing any misinformation, as well as adding any new information to the page.

To do
Update for 2.2.0
  • New behaviour for new bosses, obviously
  • Music can be restored to "normal" by this action if the level header calls for it
  • New linedef executor behaviour to support multiple bosses in the same map
  • Update info on reserved tags! (note: 2.1 added LE_BOSSDEAD tag linedef exec calling behaviour and we never documented that welp)

A_BossDeath is an action that is used as the thinker for a boss after it is defeated. It makes the Egg Capsule rise to the surface (using the sector tags 680-682). If the boss has MF2_BOSSNOTRAP (which is given to Objects with the flag MF_BOSS if the map Thing flag Special is checked), it will end the level instead of making the Egg Capsule rise when this action is used.

Any after-death effects, apart from the Egg Capsule/ending the level, varies depending on the actor's Object type. By default the boss will be set to use XDeathState for the "fleeing" animation, and it will search for the closest Boss Escape Point to fly towards. If none are found however, the boss will fly directly upwards instead.

For the Egg Slimer, this action also spawns the Objects for the two tanks and spigot (MT_BOSSTANK1, MT_BOSSTANK2, and MT_BOSSSPIGOT) to make them appear as if they had fallen off the Egg Slimer itself itself.

For King Bowser, sector tag 650 is run instead of the usual after-death behavior, which was used to open the door to the exit in Mario Koopa Blast Zone Act 3 for 2.0.

For both Brak Eggman and Brak Eggman (Old), they will simply become intangible, and play sfx_befall for their falling down animation.

Otherwise, Lua can be used to create additional or completely different after-death effects for a boss using the BossDeath hook. This cannot be used to overwrite the Egg Capsule/level-ending behavior however.

Note that if there are any other bosses within the same map that haven't been defeated yet, the boss will skip straight to the after-death behavior. If there are no players left alive however (or in netgames when all players have no lives or continues left), the boss using this action will not do anything.

Object used Effect
Egg Mobile;
Sea Egg;
Metal Sonic (Battle);
Custom Objects with MF_BOSS
Actor goes to XDeathState for fleeing animation;
Actor is given MF_NOGRAVITY, MF_NOCLIP and MF_NOCLIPHEIGHT (as well as MF2_BOSSFLEE if it has a Boss Escape Point to fly to)
Egg Slimer Actor goes to XDeathState for fleeing animation;
Actor is given MF_NOGRAVITY, MF_NOCLIP and MF_NOCLIPHEIGHT (as well as MF2_BOSSFLEE if it has a Boss Escape Point to fly to);
Tanks and spigot "fall off"
Brak Eggman;
Brak Eggman (Old)
MF_SPECIAL is removed from and MF_NOCLIP is added to the actor's flags;
sfx_befall is played
King Bowser Opens door to the exit (using sector tag 650)
Object property Use
XDeathState Fleeing state

  Actions – Boss thinkers [view]