Verse: How to get/check the amount of Ressources (Wood,Stone,Metal) a player has

Hi there, is there a way to check how to get the amount of Ressources a player has? But I would need a solution where the player has to do nothing.

You can use a conditional_button_device and check out the following:

# Returns how many items an `Agent` has of the item stored at `KeyItemIndex`.
GetItemCount<public>(Agent:agent, KeyItemIndex:int):int = external {}

# Returns if the `Agent` has all of the items required to interact with this Device.
HasAllItems<public>(Agent:agent)<transacts><decides>:void = external {}

# Returns if the `Agent` is currently holding any of the items stored in the Device.
IsHoldingItem<public>(Agent:agent)<transacts><decides>:void = external {}

# Returns if the `Agent` is currently holding the item stored at `KeyItemIndex`.
IsHoldingItem<public>(Agent:agent, KeyItemIndex:int)<transacts><decides>:void = external {}
3 Likes

Thanks a lot!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.