GetArmorInfo

From ZDoom Wiki
Jump to navigation Jump to search

str GetArmorInfo (int infotype)
int GetArmorInfo (int infotype)
fixed GetArmorInfo (int infotype)

Usage

Retrieves the value of the specified infotype for the currently equipped armor. This function works on players only.

Parameters

  • infotype: the armor information to retrieve its value:
    • ARMORINFO_CLASSNAME
The class name of the armor. If the player has no armor, the class name will be None.
  • ARMORINFO_SAVEAMOUNT
The save amount of the armor if the equipped armor is of the BasicArmorPickup type, the max save amount if it is of the BasicArmorBonus type. Do note, however, that if the player is already equipped with some sort of armor, this value could change upon picking up BasicArmorBonus-derived items whose max save amount is higher than whatever value is currently stored for this info type; the higher of the two values will be the one used, and thus returned.
  • ARMORINFO_ACTUALSAVEAMOUNT
The save amount of the armor if the equipped armor is of the BasicArmorPickup type, the max save amount if it is of the BasicArmorBonus type. Unlike SAVEAMOUNT above, picking up BasicArmorBonus-derived items on top of the current armor does not alter the value returned for this info type in any way.
  • ARMORINFO_SAVEPERCENT
The save percent of the armor.
  • ARMORINFO_MAXABSORB
The max absorb of the armor.
  • ARMORINFO_MAXFULLABSORB
The max full absorb of the armor.

Return value

Returns the stored value of the specified infotype. For CLASSNAME, the value is returned as a string; for SAVEAMOUNT, ACTUALSAVEAMOUNT, MAXABSORB and MAXFULLABSORB, it is returned as an integer; and for SAVEPERCENT, it is returned as a fixed point value.

Examples

Nuvolachalk.png Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated.