Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » timers little question
Re: timers little question [message #466341 is a reply to message #466320] Wed, 18 April 2012 13:08 Go to previous messageGo to previous message
Whitedragon is currently offline  Whitedragon
Messages: 832
Registered: February 2003
Location: California
Karma:
Colonel
zunnie wrote on Wed, 18 April 2012 03:29

If there are two scripts on ONE object and they both use timer 1 they will conflict i believe. Then both scripts will trigger when
timer 1 runs out.

No, a timer will only trigger the script that started it, or rather, the script class that was passed to it. Generally you pass the "this" pointer which points to the script class you're calling it from.

As for the timer number, it's so you can have multiple timers in one script class. The timer number will be passed to Timer_Expired when it's called.

For example you could have a regen script that regened 1 health every second and 1 armor every 5 seconds. The health timer would have a timer number of 1 which you would check for in the Timer_Expired function, and the armor regen timer would have a timer number of 2 which you would again check for.

If your timer is only doing one thing then you don't need to worry about the timer number.


Black-Cell.net
Network Administrator (2003 - )

DragonServ, Renegade's first IRC interface bot
Creator and lead coder (2002 - )

Dragonade, Renegade's first server side modification
Lead coder (2005 - )
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: brenbot create custom messages
Next Topic: Commands->Set_Position()
Goto Forum:
  


Current Time: Sat Dec 21 19:43:45 MST 2024

Total time taken to generate the page: 0.00724 seconds