ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:setinventory

This is an old revision of the document!


Table of Contents

SetInventory

void SetInventory(str item, int amount)

Description

Sets the amount of items of the given type in the activator's inventory to amount.

This function is optimized for networking and won't call TakeInventory or GiveInventory if the actor already has the exact amount of items.

Examples

SetInventory("Shells", 8); // The player will now have exactly 8 shells.
SetInventory("IsReloading", 0); // Set the "IsReloading" flag to 0.
functions/setinventory.1497362230.txt.gz · Last modified: 2017/06/13 16:57 by korshun