Classes:BasicArmorPickup
From ZDoom Wiki
| Basic armor pickup | |||
|---|---|---|---|
| Actor type | Internal | Game | |
| DoomEd Number | None | Class Name | BasicArmorPickup |
Classes: Inventory→Armor→BasicArmorPickup
→BlueArmor
→EnchantedShield
→GreenArmor
→LeatherArmor
→MetalArmor
→SilverShield
BasicArmorPickups are armor items that replace any existing armor with themselves if the player's armor points are less than this item provides. The base class BasicArmorPickup is never used directly. It is always the base class for predefined items (like Doom's green armor) or for items defined in DECORATE. BasicArmorPickup items can be placed in the inventory. If that is done they will activate automatically when the previous armor has worn off.
BasicArmorPickup sets the INVENTORY.AUTOACTIVATE flag by default. However, if you want to define an item that doesn't automatically activate you can clear this flag again.
Using in DECORATE
BasicArmorPickups use the basic Inventory properties to define their behavior as inventory items. They also define a few new properties to define their behavior as armor.
- armor.saveamount amount
- The amount of armor that this item gives.
- armor.savepercent percentage
- Percentage is specified as a floating point value between 0.0 and 100.0
- The percentage of damage that the armor absorbs.
Examples:
actor RedArmor : BasicArmorPickup 92
{
inventory.pickupmessage "Picked up the HyperArmor!"
inventory.icon "ARM5A0"
armor.saveamount 300
armor.savepercent 75
states
{
Spawn:
ARM5 A 6
ARM5 B 7 bright
loop
}
}

