Editing
CheckInventory
From Eternity Wiki
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{ACSFunction|description=Checks player activator ownership of items. |usage=''int'' '''CheckInventory'''(''str itemname'') |parameters= *''itemname'': name of [[item|EDF_item_effects_and_inventory]] or [[power|EDF_item_effects_and_inventory#powereffect]] |return=How many items or how much power is left. See notes. |notes= 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. |id=ACC internal }}
Summary:
Please note that all contributions to Eternity Wiki are considered to be released under the GNU Free Documentation License 1.2 (see
Eternity Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Template:ACSFunction
(
edit
)
Navigation menu
Page actions
Page
Discussion
Read
Edit
History
Page actions
Page
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Log in
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
Tools
What links here
Related changes
Special pages
Page information