Hi guys. i need a function like “wait_for” or just “wait”
here is what i mean:
local some\_another\_variable\_is\_true=1 local strestimer\_start=0 function die\_from\_stress() --{ if(some\_another\_variable\_is\_true==1)then wait\_for(some\_another\_variable\_is\_true) ----This --OR --[[ while(some\_another\_variable\_is\_true==1) ------Or this { wait(1) } --]] end die() stres=0 strestimer\_start=0 end --} function main() if(stres\>7)then --{ if(strestimer\_start==0)then strestimer=timer.performWithDelay( 5000, die\_from\_stress, 1 )--die after 5 seconds strestimer\_start=1 end end --} end Runtime:addEventListener( "enterFrame", main)
Any suggestions are welcome. Thanks.