Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Movement problem(with Input.KeyDown)
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Barda4




PostPosted: 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
Sponsor
sponsor
CodeMonkey2000




PostPosted: 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.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: