ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


new:inventory

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
new:inventory [2018/02/18 18:08] – created korshunnew:inventory [2018/02/18 18:12] korshun
Line 3: Line 3:
 ===== SetInventory ===== ===== SetInventory =====
  
-  * void SetInventory(str itemname, int count) +  * ''void SetInventory(str itemname, int count)'' 
-  * void SetActorInventory(int tid, 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. 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. 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.
 +
 +===== GiveMaxInventory/TakeMaxInventory =====
 +
 +  * ''void GiveMaxInventory(str itemname)''
 +  * ''void GiveMaxActorInventory(int tid, str itemname)''
 +  
 +Give maximum possible number of ''itemname'' to actor. Shorthand for ''GiveInventory(itemname, INT_MAX)''.
 +
 +  * ''void TakeMaxInventory(str itemname)''
 +  * ''void TakeMaxActorInventory(int tid, str itemname)''
 +
 +Take all items of type ''itemname'' from actor. Shorthand for ''TakeInventory(itemname, INT_MAX)''.
  
  
new/inventory.txt · Last modified: 2018/02/18 18:13 by korshun