Scripts / Reset timer every few seconds

Author
Message
hukuta94
13
Years of Service
User Offline
Joined: 4th Jan 2011
Location: Russian Federation
Posted: 29th Oct 2014 17:06 Edited at: 29th Oct 2014 17:07
How to realize in Lua resets the timer? I want to write a script for entity local timer which is reset every 2 seconds. To check, I typed "prompt" to "follow" the timer. But the timer is not reset. Please help.



PM
J_C
16
Years of Service
User Offline
Joined: 9th Nov 2007
Location:
Posted: 29th Oct 2014 18:31
#hukuta94

your check for timer == 1 is inside your check for if timer == 0
so it will only run once...

move the if timer == 1 code to just before or after the Prompt line...
PM
hukuta94
13
Years of Service
User Offline
Joined: 4th Jan 2011
Location: Russian Federation
Posted: 29th Oct 2014 18:41
It work! Thanks!

PM

Login to post a reply

Server time is: 2024-05-02 06:52:00
Your offset time is: 2024-05-02 06:52:00