Revive

From ZDoom Wiki
Jump to navigation Jump to search

Actor

void Revive ()

Usage

This function is part of the actor resurrection code. It resets some of the calling actor's attributes to their defaults. These include flags, damage type, health and target field. It also updates the total monsters count accordingly if the actor is a monster, and triggers the WorldThingRevived event.

Error.gif
Warning: This function doesn't reset the calling actor's height. Most actors have their height reduced to 25% of default or to their DeathHeight when killed. As such, height has to be reset manually.


Examples

This version of the Zombieman will revive itself after 100 tics. Note, it can still be killed by gibbing, since its XDeath state sequence is unchanged.

class UndyingZombieman : Zombieman
{
	States {
	Death:
		POSS H 5;
		POSS I 5 A_Scream;
		POSS J 5 A_NoBlocking;
		POSS K 5;
		POSS L 100;
		#### # 0 
		{
			Revive();
			height = default.height;
		}
		POSS KJIH 4;
		goto See;
	}
}