| 
			
				|  | Castle Paradox 
 
 |  
 
	
		| View previous topic :: View next topic |  
		| Author | Message |  
		| RPGrealm5 Sir, the Goombas are dancing again!
 
 
 
  
 Joined: 17 Apr 2003
 Posts: 354
 Location: Sacramento, CA
 
 | 
			
				|  Posted: Mon Oct 20, 2003 11:31 am    Post subject: Creating a timer... |   |  
				| 
 |  
				| How do you create a countdown timer, where you can set the time? Call me stupid for not knowing already, but I'd really like to know from someone who already does. _________________
 Gyu, Doh!
 |  |  
		| Back to top |  |  
		|  |  
		| Setu_Firestorm Music Composer
 
 
 
  
 Joined: 26 Mar 2003
 Posts: 2566
 Location: Holiday. FL
 
 | 
			
				|  Posted: Mon Oct 20, 2003 11:37 am    Post subject: |   |  
				| 
 |  
				|  	  | James' PlotDictionary wrote: |  	  | for(counter,start,finish,step) do(commands) The for command runs the commands in the do block a specified number of times. The first argument to for is the counter. It must be a variable. The next two arguments are the starting value and the finishing value. For example, if you use a start value of 1 and a finish value of 10 then the do block will run 10 times. The first time the do block runs, the counter will be 1, then it will be 2, then 3 and so on until it reaches 10, the finish value. The fourth argument of for is optional. It is the step by which the counter will change each loop. If you use a step of 2 then the counter will count 1,3,5,7,9. If you switch the start and finish values and use a step of -1 then the counter will go backwards. If you use 0 as the step, the counter will never change, so the do block will repeat forever. There are examples of for commands in WANDERP.HSS
 
 
 | 
 _________________
 
   
 Facebook: http://www.facebook.com/georgerpowell
 Newgrounds: http://setu-firestorm.newgrounds.com
 |  |  
		| Back to top |  |  
		|  |  
		| Cube Dimensional Traveller
 
 
 
  
 Joined: 02 Feb 2003
 Posts: 294
 
 
 | 
			
				|  Posted: Mon Oct 20, 2003 11:42 am    Post subject: |   |  
				| 
 |  
				| Yeah.  Basicly, a timer is just a loop.  If you want to make one yourself, you should study those  . 
 However, in my plotscript library there is a command that allows you to create a timer.
 
 
  	  | Quote: |  	  | Count DownUp (Mins/Secs, Tag, Down/Up, Display Counter) 
 
 This command will start a count down (Or count up) for you. The first argument is the minute and seconds you want it to count up/down to. For example, 30 seconds would be just 30. A minute and 30 seconds is 130. Two minutes and 30 seconds is 230. And so on. The second argument is a tag that, when turned on, will terminate the countdown. The third is wheither you want it to count up or down (Default is up) and the fourth is if you want the countdown to be displayed in the bottom corner. (NOTE: This command can also be used in if statements. If the timer didn't complete successfully (By turning on the tag) then it'll return false. Otherwise, it returns true).
 | 
 
 You'll be able to find the library in a sticky in this forum.
 
 So, there's a few ways of doing it.  If you need a specific timer for a specific task then be sure to post it and I'll help you make it.
 |  |  
		| Back to top |  |  
		|  |  
		| RPGrealm5 Sir, the Goombas are dancing again!
 
 
 
  
 Joined: 17 Apr 2003
 Posts: 354
 Location: Sacramento, CA
 
 | 
			
				|  Posted: Mon Oct 20, 2003 2:44 pm    Post subject: |   |  
				| 
 |  
				| Alright, thank you. _________________
 Gyu, Doh!
 |  |  
		| Back to top |  |  
		|  |  
		|  |  
  
	| 
 
 | You can post new topics in this forum You can reply to topics in this forum
 You cannot edit your posts in this forum
 You cannot delete your posts in this forum
 You cannot vote in polls in this forum
 
 |  
 Powered by phpBB © 2001, 2005 phpBB Group
 
 
 |