Ifpinventory

From EDukeWiki
Jump to navigation Jump to search

ifpinventory <inventory item> <value> { success_branch... }

For the following <inventory item>s, takes success_branch if the current player 's amount of the inventory item being tested is not equal to <value>:

  • GET_BOOTS
  • GET_FIRSTAID
  • GET_HEATS
  • GET_HOLODUKE
  • GET_JETPACK
  • GET_SCUBA
  • GET_STEROIDS


For access cards (<inventory item> is GET_ACCESS), success_branch is taken whenever the current player has got the respective (determined by the palette of the current actor) access card.
For armor (<inventory item> is GET_SHIELD), success_branch is taken whenever the armor amount is not equal to the maximum armor amount. [Duke3D 1.5: maximum health]
Note that <value> is ignored for the two last cases.

Inventory amounts may also be tested and adjusted using the player member functions.