About Store Forum Documentation Contact



Post Reply 
Sleep function
Author Message
zarmen98 Offline
Member

Post: #1
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
Find all posts by this user Quote this message in a reply
RedcrowProd Offline
Member

Post: #2
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
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #3
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
Find all posts by this user Quote this message in a reply
Post Reply