int GetMaxInventory (int tid, string inventory);
Retrieves the maximum amount of the specified inventory item. If the item is present in the inventory of the actor on which to perform the check (henceforth called "reference actor"), the function retrieves the current maximum amount of that item. If, however, the item is absent from the inventory, the maximum amount of the item as defined by its actor class is retrieved, instead.
The function has a special handling for when "Health" is passed as inventory; if the reference actor is a player, it retrieves its current maximum health, otherwise it retrieves the spawn health if the actor is a non-player. This behaves exactly like GetActorProperty with APROP_SpawnHealth.
- tid: The tid of the reference actor. If this is 0, the check is performed on the activator of the script.
- inventory: The inventory item to get its maximum amount.
The function returns 0 if the reference actor is non-existent, otherwise the value returned is as explained above.
|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.|