<aside> ⚡ script "core_CanGainHealth" (void)

</aside>

Usage


Checks if the calling player’s health is lower than their max health, essentially the condition for them being able to restore health.

<aside> 🚨 This script currently does not check if the player is dead, so make sure to check for that manually to avoid giving health to dead players!

</aside>

Return Value

Returns true if the player’s health is lower than their max health, false otherwise.

Example


E Tank’s Use state uses this script to disallow use if the player is already full health (or even overhealed).

Use:
	EBAL E 0 A_JumpIf(CallACS("core_CanGainHealth"),"Success")
	fail

See Also


core_gethealth

core_getmaxhealth