Movement problem(with Input.KeyDown) 
	 
	
		| Author | 
		Message | 
	 
		 
		Barda4
 
 
 
    
		 | 
		
		
			
				  Posted: Thu Feb 15, 2007 9:20 pm    Post subject: Movement problem(with Input.KeyDown)  | 
	
				
				 | 
			 
			 
				
  | 
			 
			
				I am having trouble getting my sprite to move. I get it so he just stands there, but he doesn't move. Here the code.
 
I think it's all that's needed I don't know for sure.
 
 
loop
 
    Input.KeyDown (chars)
 
end loop
 
if chars (KEY_RIGHT_ARROW) then
 
    fork linkwalkright
 
    chright := true
 
    chleft := false
 
    chup := false
 
    chdown := false
 
elsif chars (KEY_LEFT_ARROW) then
 
    fork linkwalkleft
 
    chleft := true
 
    chright := false
 
    chup := false
 
    chdown := false
 
elsif chars (KEY_UP_ARROW) then
 
    fork linkwalkup
 
    chup := true
 
    chright := false
 
    chleft := false
 
    chdown := false
 
elsif chars (KEY_DOWN_ARROW) then
 
    fork linkwalkdown
 
    chdown := true
 
    chright := false
 
    chleft := false
 
    chup := false
 
end if | 
			 
			
				 | 
			 
		  | 
	 
	 
		 | 
		
		 | 
	 
	  
		  | 
	 
		 
		Sponsor Sponsor 
		 
  
		 | 
		
 | 
	 
	 
		  | 
	 
				 
		CodeMonkey2000
 
 
 
    
		 | 
		
		
			
				  Posted: Thu Feb 15, 2007 9:41 pm    Post subject: RE:Movement problem(with Input.KeyDown)  | 
	
				
				 | 
			 
			 
				
  | 
			 
			
				| Umm...put the end loop at the end of your porgram. | 
			 
			
				 | 
			 
		  | 
	 
	 
		 | 
		
		 | 
	 
	  
		  | 
	 
				 
		 | 
	 
 
	
	
	 
	
	 |