Keeping track of item in inventory

Hello! I have recently been developing gimkit games and I have a question that I was not able to figure out. In my game, due to resources being deleted on spawn, energy is also removed, which is required to move. How would I simultaneously save the value of the energy bar and give that certain amount of energy to the player on spawn. Thank you!

You can have a value/property that is set to your number of energy, then have a repeater that activates once you start and have that repeater increment a value and give energy until that value matches the property.

What about when the energy is removed by the player moving…. There is no option in the payer movement for on move tick

Movement meter
xxxxxx

1 Like

Yes that’s what I meant but it does not answer my question….

1 Like

All I want to do is save the value of the energy bar in a property. If it’s 400, that’s what it’ll save, if it’s 895, that’s what it’ll save.

You could use item trackers for the resources and connect a knockout tracker to them so when a player dies, those specific items are removed.

1 Like

Or put save items on knockout (In map options) to no.

1 Like

Right now, you loose all resources when you die, even energy

Using properties to store that value is a good idea - you could either have the player be given a certain amount of energy upon being knocked out…

… or just have the Inventory Item Manager override the respawn value of that item! Because the device’s values are taken into consideration when clearing a player’s inventory, the player should be able to keep the energy that they currently have - even if they’ve just been knocked out.
image

3 Likes

Oh! Well then you should keep energy and remove all the others using inventory item managers

1 Like

Welcome to the community!