| Making a restart function 
 
	 
	
		| Author | Message |   
		| Sicarius 
 
 
 
 
 | 
			
				|  Posted: Mon Dec 16, 2013 6:05 pm    Post subject: Making a restart function |  |   
				| 
 |  
				| What is it you are trying to achieve? I'm trying to make it so that when a VAR is equal to 0 that the program will reset and you will have to start from the begining
 
 
 What is the problem you are having?
 I'm not sure how to do this, i assume i will require a loop of some sort and then when the VAR is equal to 0 it exits the loop
 
 
 Describe what you have tried to solve this problem
 Haven't tried to do it because im not sure how
 
 
 Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
 loop
 delay(200)
 mouse  % this is a procedure to track where the mouse is at
 
 Pic.Draw (level1,0,0,0)
 if x > 40 and x < 360 and y > 150 and y < 220 and button = 1 then
 Wrong
 delay (500)
 lives := lives -1
 elsif x > 40 and x < 360 and y > 260 and y < 370 and button = 1 then
 Wrong
 delay (500)
 lives := lives -1
 elsif x > 380 and x < 700 and y > 150 and y < 220 and button = 1 then
 exit
 elsif x > 380 and x < 700 and y > 260 and y < 370 and button = 1 then
 Wrong
 delay (500)
 lives := lives -1
 end if
 
 View.Update
 delay (20)
 cls
 end loop
 
 I'm going to have multiple loops so i need something that will work for multiple ones.
 Please specify what version of Turing you are using
 4.1.1
 |  
				|  |  |   
		|  |  |  
	  
		|  |   
		| Sponsor Sponsor
 
  
   |  |   
		|  |   
		| Tony 
 
  
 
 
 |  |   
		|  |  |  
	  
		|  |   
		|  |  
 |