Classes:BasicArmorBonus
From ZDoom Wiki
Note: Wait! Stop! Before you flex your Ctrl-C/Ctrl-V muscles and copy this actor's definition in your mod, remember the following things:
|
| Basic armor bonus | |||
|---|---|---|---|
| Actor type | Internal | Game | |
| DoomEd Number | None | Class Name | BasicArmorBonus |
Classes: Inventory→Armor→BasicArmorBonus
→ArmorBonus
BasicArmorBonus are armor items that add points to the player's current armor. The base class BasicArmorBonus is never used directly. It is always the base class for predefined items (like Doom's armor bonus) or for items defined in DECORATE.
BasicArmorBonus sets the INVENTORY.AUTOACTIVATE and INVENTORY.ALWAYSPICKUP flags by default. However, if you want to define an item that doesn't use these settings you can clear them again.
DECORATE definition
Actor BasicArmorBonus : Armor native { +Inventory.AUTOACTIVATE +Inventory.ALWAYSPICKUP Inventory.MaxAmount 0 Armor.SavePercent 0.333333 }
Using in DECORATE
BasicArmorBonus uses 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.SavePercent percentage
- Percentage is specified as a floating point value between 0.0 and 100.0
- The percentage of dealt damage that the armor absorbs.
- Armor.MaxSaveAmount amount
- Sets the maximum amount of armor you can reach by picking up this item.
- Armor.SaveAmount amount
- The amount of armor that this item gives.
- Armor.MaxBonus amount
- The amount of armor you obtain additionally to your save amount value.
- Armor.MaxBonusMax amount
- The maximum additional save amount you can obtain with the armor.
Examples:
actor 2xArmorBonus : BasicArmorBonus 11009
{
armor.maxsaveamount 250
armor.savepercent 50
armor.saveamount 2
inventory.icon "ABO2A0"
states
{
Spawn:
ABO2 AB 3
ABO2 C 6
ABO2 B 3
loop
}
}
Examples: BasicMaxArmorBonus (Skulltag Imported)
actor MaxArmorBonus : BasicArmorBonus 2015
{
spawnid 176
radius 20
height 16
inventory.pickupmessage "Picked up a max armor bonus."
inventory.icon "ARM1A0"
armor.savepercent 33.33333
armor.saveamount 1
armor.maxsaveamount 200
armor.maxbonus 1
armor.maxbonusmax 50
+COUNTITEM
+INVENTORY.ALWAYSPICKUP
states
{
Spawn:
BON2 ABCDCB 6
loop
}
}

