From ZDoom Wiki
Jump to navigation Jump to search
Note: This feature is for ZScript only.

bool CheckArmorType(name Type[, int amount])


Checks to see if the Actor has a certain amount of the provided armor type.


  • Type - The name of the armor class to check for.
  • amount - Default is 1. The minimum amount of armor needed.

Return value

Returns true if the Actor has the correct armor type with at least the amount provided.


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.

Internal Code

bool CheckArmorType(name Type, int amount = 1)
    let myarmor = BasicArmor(FindInventory("BasicArmor"));
    return myarmor != null && myarmor.ArmorType == type && myarmor.Amount >= amount;