Classes:Health
From ZDoom Wiki
Note: Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
|
| Health | |||
|---|---|---|---|
| Actor type | Internal | Game | |
| DoomEd Number | None | Class Name | Health |
Classes: Inventory→Health
→CrystalVial
→HealthBonus
→Medikit
→MegasphereHealth
→Soulsphere
→Stimpack
A Health item adds a certain amount to the player's health points. Items of this type are always effective when picked up. They cannot be placed in the inventory; to have health items in inventory, use HealthPickup. Health is never used directly. This class is only used as a base class for predefined items (like Doom's Stimpack or for items defined in DECORATE.
Using in DECORATE
Health items support all the basic Inventory properties. However, they use a few of them differently:
- Inventory.Amount value
- Sets the amount of health this item gives when picked up.
- Inventory.MaxAmount value
- Sets the maximum amount of health you can get with this item.
In addition they define one new property:
- Health.LowMessage value, message
- When pickupper's health is lower than value, the pickup message is set to message.
Examples:
actor Whiskey : Health 10715
{
Inventory.PickupMessage "You drank some booze."
Inventory.Amount 5
Inventory.MaxAmount 200
+COUNTITEM
states
{
Spawn:
RWHI A -1
stop
}
}
actor DogFood : Health 10575
{
Inventory.PickupMessage "Ate some dog food. Woof!"
Inventory.PickupSound "dog/sight"
Inventory.Amount 4
Inventory.MaxAmount 200
+COUNTITEM
+INVENTORY.ALWAYSPICKUP
states
{
Spawn:
AWI1 A -1
stop
}
}
DECORATE definition
ACTOR Health : Inventory native { Inventory.Amount 1 Inventory.MaxAmount 0 Inventory.PickupSound "misc/health_pkup" }
Categories:
- 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