I want to increase a resources variable every second. For exemple, when the player do an activity like mining iron, the iron variable increase every second +1
And I want to display the increasement on a screen. I know I need to do some loops... but I don't know how...
I search some tuto or advises on the forum, I found something with ui.timer but it's out of date (the post was written in 2008). I tried something in python
Code: Select all
python:
iron = 0
while True:
iron +1
time.sleep(1.0)I don't understand how work time and how can I use the function ? Can you help me ?