Help please, how can I realize energy recovery after leaving the game?

Thanks for the help!!
I did this: I get the energy equal to the passed minutes (1 minute = 1 energy), but if you change the time on the device, you can cheat and hack this game :frowning:
(Sorry for my English:)

A bit off topic: this function includes starting a push notification, but how to get the function to turn on (and say that the energy is full) when the game is closed? I do not understand how to accurately record the time required for full energy in the “Local schedule notification” :frowning:

thanks for the info:)

I’m making a game on Android, I have resources (Float) in the game that I need to receive even when the game is closed, but I can not figure out how to do it :frowning:

What are you trying to do? If it’s just time then you can just get the current real world time when you start the app again and compare to a saved value from before the user closed the app.

Hey bartalam,

You can save the time the game was closed and compare it with when open the game.

Example

When Exit Game

Check Begin Game

UtcNow() function return Coordinated Universal Time. It’s mean not change.

https://docs.unrealengine.com/latest/INT/API/Runtime/Core/Misc/FDateTime/UtcNow/index.html