zarmen98
Member
|
Sleep function
i wanna put a wait time between 2 codes
like
player.hp-=10;
wait 5 seconds //
player.hp+=10;
how can add a wait timer? (in new thread i dont wanna freeze my game)
|
|
06-10-2019 03:18 PM |
|
RedcrowProd
Member
|
RE: Sleep function
You should do a flt timer and dimish it by time.rt once below 0 do your health+10 then reset timer to 5
I dont think its smart or gonna work to do sec thread and use sleep on it
|
|
06-10-2019 08:08 PM |
|
Esenthel
Administrator
|
RE: Sleep function
Time.wait
And I agree mechanics like that should be done on the main thread similar to what RedcrowProd described
|
|
06-11-2019 02:05 AM |
|