CheckInventory
Description[edit]
This is an ACS built-in function.
Checks player activator ownership of items.
Usage[edit]
int CheckInventory(str itemname)
Parameters[edit]
- itemname: name of EDF_item_effects_and_inventory or EDF_item_effects_and_inventory#powereffect
Return value[edit]
How many items or how much power is left. See notes.
Examples[edit]
No examples given.
Notes[edit]
If item is invalid or undefined, it returns 0.
For a power, which is defined by any of the names from the linked section, which start with Power..., if it's of infinite duration (or if it's PowerStrength), it will return -1. Otherwise it returns the number of tics left.
If not a power, valid names belong to healtheffect, armoreffect, ammoeffect, powereffect, weapongiver or artifact definitions. For each of these types, it returns how many units you have, not how many pickups you used to reach the current value. For example if an ammo clip gives you 10 rounds, and you have 50 rounds, using CheckInventory with this ammo clip name will return 50, not 5. Same with power effects, it will return the same as with direct Power... arguments. For weapon givers likewise, it will return 1 if you have the respective weapon, without looking at the ammo given when picking one up.
This function's identification in zspecial.acs is: ACC internal.