bool A_SetInventory (string type, int count [, pointer ptr [, bool beyondMax]]])
Behaves similarly to A_GiveInventory with a few key exceptions.
- The amount is specifically set, not added or subtracted. As such, setting it to 0 will remove the item completely.
- As such, ignores health properties and skill levels. Use A_GiveInventory for standard giving.
- type: the item to give. This should be a valid inventory item.
- count: the amount to set.
- ptr: the actor to give the item to. This is an actor pointer selector. Default is AAPTR_DEFAULT, which corresponds to the caller of the function.
- beyondMax: Unlike A_GiveInventory, this function respects the MaxAmount property at all times. Setting this to true will ignore the maximum value. Default is false.
The function returns true if the actor has their inventory changed. Thus, if they already have the amount specified, it returns false.
|Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please. This will make it easier to understand for future authors seeking assistance. Your contibutions are greatly appreciated.|