A_SkullPop

From ZDoom Wiki
Jump to navigation Jump to search

A_SkullPop (string className)

Will launch an actor of type className from the top of the calling actor in a vertical direction. Only effective when used on players (use A_SpawnItemEx for a generic actor equivalent). The player's viewpoint will immediately switch to that of the spawned actor (hence the name of the function).

Additionally, it prevents the player from using “resurrect” in the console to revive themselves after death.

This function is used in the “XDeath” states of Heretic's Corvus and the Fighter from Hexen, to separate the severed head from the main corpse. The player sees through the eyes of the head as it bounces to a stop.

If className is not given, it defaults to BloodySkull.

Examples

From the Fighter DECORATE definition:

 XDeath:
   PLAY O 5 A_PlayerScream
   PLAY P 5 A_SkullPop
   PLAY R 5 A_NoBlocking
   PLAY STUV 5
   PLAY W -1
   Stop