GiveInventory

From Eternity Wiki
Revision as of 02:26, 10 May 2026 by Printz (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Description[edit]

This is an ACS built-in function.

Gives inventory items to player activator.

Usage[edit]

void GiveInventory(str itemname, int amount)

Parameters[edit]

  • itemname: name of item or power to give.
  • amount: how much to give. If negative value, then give maximum possible.

Return value[edit]

Examples[edit]

No examples given.

Notes[edit]

If amount is 0, this will do nothing.

If name is a Power... name, then it gives the player extra amount tics of power, which can add if the player already has this power. Important exception is with PowerStrength, which is always infinite (but adding to the number will speed up "recovering" from the red tint). With negative amount, the power will last forever.

For any item that is not a direct power name, it will grant the same amount as if player picked up amount items, if the value is positive, or the maximum possible for that item, if negative.

This function's identification in zspecial.acs is: ACC internal.

See also[edit]