Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | jvnq1992 |
(i am using gdscript)
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | jvnq1992 |
(i am using gdscript)
Reply From: | zhyrin |
By offline progress do you mean you close the game at a specific state and if you come back 1 hour later you expect the game to have the same state + what would have happened in that one hour?
If that’s the case:
So how i compare the saved time and the current time? I dont know
jvnq1992 | 2023-02-12 10:33
I dont know how simulate every object and also i dont know how to compare also too i dont know how calculate the difference
jvnq1992 | 2023-02-12 12:25
Use Time
to get current time.
If you use unix time, it’s as simple as subtracting the saved time from the current.
Lets say you can purchase a cursor object that clicks the clickable every two seconds.
In your save file I assume you would store how many cursor objects the player bought.
Once you have the time difference you check how many times two seconds fit into it, and multiply the result by the number of purchased cursors.
zhyrin | 2023-02-15 20:30