| timers little question [message #466317] | 
			Wed, 18 April 2012 02:27   | 
		 
		
			
				
				
				
					
						  
						robbyke
						 Messages: 348 Registered: September 2010  Location: Belgium
						
	Karma: 0
 
					 | 
					Recruit  | 
					 | 
		 
		 
	 | 
 
	
		the number you give with a timer does it have any effect? 
 
i have always used 1 and it works but could it be things are getting delayed?
		
		
  Owner of kambot TT server 
 
kambot.freeforums.org
		
 |  
	| 
		
	 | 
 
 
 | 
	| 
		
 | 
	| 
		
 | 
	
		
		
			| Re: timers little question [message #466341 is a reply to message #466320] | 
			Wed, 18 April 2012 13:08    | 
		 
		
			
				
				
				  | 
					
						  
						Whitedragon
						 Messages: 832 Registered: February 2003  Location: California
						
	Karma: 1
 
					 | 
					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 - )
		
 |  
	| 
		
	 | 
 
 
 | 
	
		
		
			| Re: timers little question [message #466397 is a reply to message #466317] | 
			Thu, 19 April 2012 19:16   | 
		 
		
			
				
				
				
					
						  
						robbyke
						 Messages: 348 Registered: September 2010  Location: Belgium
						
	Karma: 0
 
					 | 
					Recruit  | 
					 | 
		 
		 
	 | 
 
	
		so if youre kinda lazy adn always just use number 1 2 3 in your script to make it easy there no troubles at all 
 
nice to know this for sure now
		
		
  Owner of kambot TT server 
 
kambot.freeforums.org
		
 |  
	| 
		
	 | 
 
 
 |