From ZDoom Wiki
Jump to navigation Jump to search

virtual int GetGibHealth()


In ZScript

An Actor virtual function that obtains the actor's GibHealth. Normally, returns the negative value of the actor's gibhealth field, but can be overridden to add custom behavior.

This value is used to determine the negative threshold that the health value must reach to trigger extreme death sequence (using the actor's XDeath state sequence instead of Death).


In DECORATE this is a simple information function that returns the actor's gibhealth (as a negative value). It cannot be altered in any way.

ZScript definition

Note: The ZScript definition below is for reference and may be different in the current version of GZDoom.The most up-to-date version of this code can be found on GZDoom GitHub.

The base defintion looks like this:

	virtual int GetGibHealth()
		if (GibHealth != int.min)
			return -abs(GibHealth);
			return -int(GetSpawnHealth() * gameinfo.gibfactor);


Nuvolachalk.png Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated.

See also