GetMaxInventory

From Eternity Wiki
Jump to navigationJump to search

Description[edit]

This is an ACS built-in function.

Returns the maximum amount that the player can hold of a given item or power.

Usage[edit]

int GetMaxInventory(int tid, str itemname)

Parameters[edit]

  • tid: TID of thing to check. Only works with players.
  • itemname: name of item or power to check.

Return value[edit]

Maximum amount

Examples[edit]

No examples given.

Notes[edit]

This only works with players. If name is invalid, it returns 0.

For Power... names, if it's PowerStrength, it returns -1 (since it can never be given finite, unlike other powers). Otherwise it returns 1.

For health, armor, ammo items, it returns the maximum possible amount.

For power items, if it's permanent, it returns -1. Otherwise, it returns the given duration in tics.

For weapon givers, it usually returns 1 (one weapon available max).

This function's identification in zspecial.acs is: -93.

See also[edit]