Good day! Can you help me? I need to make an energy system, so that when the energy ends it is impossible to play. i did it, but i have a problem with getting energy through time. I get energy if the variable is less than 15 and then there is a delay and +1 energy, I tried to do it through Date Time
, but I did not understand how to work with it, I found a similar question and answer but could not implement it, I would appreciate your help!
no, i did deplete energy when pressing the play button. total energy is 15. When it ends, you can’t play until you have to wait until the energy is restored, I wrote a recovery condition (if less than 15, then there is a recovery) it remains only to make a timer so that, for example, 1 energy is restored every 5 minutes and then you can play again, I’m all did except the timer. I need to make it work when the game is not running. I found that this system is done through the data type “Date time” but I do not know how to use it, unfortunately I did not find the drawings. in the 2nd screenshot of the drawing where “delay” you need something else instead, since “delay” only works when the game is running, I hope I explained it clearly. if it is not clear, I can record a video of how it works and send you a link.
In general, I want energy to regenerate over time (every 5 minutes + 1 energy, up to 15), even if the game is closed.