Classes:MaxHealth
Note: Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
|
Maximum health | |||
---|---|---|---|
Actor type | Internal | Game | (ZDoom) |
DoomEd Number | None | Class Name | MaxHealth |
Classes: Inventory→Health→MaxHealth
A MaxHealth increases the maximum health of an actor by way of adding to its maximum health points gain. Only player-based actors, however, can have their maximum health increased by items of this class. It also retains its parent class's functionality of increasing current health.
MaxHealth is never used directly. This class is only used as a base class for items defined in DECORATE or ZScript.
Usage
Max health items support the same properties as health items. The following properties have extra functionality, in addition to that of the health items:
- Inventory.Amount value
- Sets the amount of maximum health points gain this item gives when picked up.
- Inventory.MaxAmount value
- Sets the maximum amount of maximum health points gain that can be reached by picking up this item. If the current maximum health points gain is at this value or above, picking up this item will have no effect on it, though the item could still be picked up to increase current health.
Examples
In addition to increasing current health, this item increases the player's maximum health by 1 point. The maximum health points gain that can be reached with this item is 200.
class VitalityBonus : MaxHealth { Default { Inventory.Amount 1; Inventory.MaxAmount 200; Inventory.PickupMessage "Picked up a vitality bonus."; +COUNTITEM +INVENTORY.ALWAYSPICKUP } States { Spawn: BON1 ABCDCB 6; Loop; } }
- Chex Quest actors
- Chex Quest internal actors
- Chex Quest 3 actors
- Chex Quest 3 internal actors
- Doom actors
- Doom internal actors
- Doom II actors
- Doom II internal actors
- Heretic actors
- Heretic internal actors
- Hexen actors
- Hexen internal actors
- Strife actors
- Strife internal actors
- ZDoom actors
- ZDoom internal actors
- Internal