ZDoom Line Specials

248:HealThing

Name

HealThing — heals the actor that triggered the special.

Synopsis

HealThing (amount, max);
HealThing (
  amount,    // Amount of health to give
  max        // Controls how high the activator's health can get
);

Parameters

amount
How much to heal the actor that activates this special.
max
For players, controls how high the activator's health can get. You can set it as follows:
ValueMeaning
0 The player's health is restored up to the health they spawn with, which is normally 100 points.
1 The player's health is restored up to the maximum amount that can be obtained from a Soulsphere, which is normally 200 points.
≥ 2 Any value of 2 or higher will be treated as the maximum amount of health the player can have.
For monsters, max is ignored, and the maximum is always the monster's spawn health.

ACS

This special's function is the same whether you activate it on a line or use it in a script. However, it cannot be used in open scripts because open scripts are triggered by the world and not by a specific actor.

Remarks

HealThing heals whatever activated it. It cannot be used to heal random actors on the map.

Although the player's standard maximum health and soulsphere maximum health are normally 100 and 200 respectively, these can be changed using DeHackEd. That is why max has special values for them.

Examples

Heal 10 points of the activator's health, up to its standard maximum:

HealThing (10);

Heal 10 points of a player's health, up to a maximum of 250:

HealThing (10, 250);

First Available In

ZDoom 1.17

See Also

DamageThing