I am making a game which requires a planting system that should continue even when the game is not running. I have tried using a ‘now’ node to get the current real world time the plant has been planted. I then subtract the current real world time from the planted time to get time elapsed. Once the time elapsed is over e.g. two hours the plant will be grown. I am unsure how exactly this is implemented in my blueprints. Do i need to use a while loop or an event tick to continually check each minute or is there a different method to do this?
You could use a save file to save/load the last current ingame time
and make use of Function Timer
to check every second or minute for the elapsed time to trigger event plant growth. (this one is while playing)
another method would be or in combination, only check for elapsed time when player is closed to the plant on the level map or when the player can check his current plant via a UI anytime.
And of course when the player load the game, you will have make some condition to calculate the difference in time of each current plants and do their growth only when the player load the game.