ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


new:inventory

This is an old revision of the document!


Inventory functions

SetInventory

  • void SetInventory(str itemname, int count)
  • void SetActorInventory(int tid, str itemname, int count)

Sets the number of items in actor's inventor to count. This is useful when treating inventory items like variables stored in actors.

This function is optimized to minimize bandwidth use. It computes the difference between the current item count and the requested count, and gives or takes the needed number of items. If the actor already has the exact number of items, this function does nothing.

new/inventory.1518970139.txt.gz · Last modified: 2018/02/18 18:08 by korshun