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

Username:   Password: 
 RegisterRegister   
 How do you control/move 2 objects
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
ut2004




PostPosted: Wed May 28, 2008 9:40 pm   Post subject: How do you control/move 2 objects

How do I make it so that I am able to move 2 seperate objects at once. One with the arrow keys and one with wasd.
Sponsor
Sponsor
Sponsor
sponsor
Euphoracle




PostPosted: Wed May 28, 2008 9:52 pm   Post subject: RE:How do you control/move 2 objects

There are a lot of these vague and makes-no-sense questions out here recently. What do you mean by "make two objects move"? One way to do it (if I am understanding this correctly) is to detect whether the user has pressed either of the keys (Input.*) and moving each object (by changing the x/y values that you are drawing them with) depending on the direction/key pressed.
Sean




PostPosted: Thu May 29, 2008 6:58 am   Post subject: Re: How do you control/move 2 objects

I believe that he means controlling two charactes that he created at the same time. This meaning he wants to make something like pong.

Just keep the Input.KeyDown in one loop and do your key movement formulas for both characters. They will have different variables. One major loop, that is all it takes to make both work.
nastynika




PostPosted: Thu May 29, 2008 8:05 am   Post subject: Re: How do you control/move 2 objects

also make sure to check the help section in turing itself it will will show u how
Hendo




PostPosted: Thu May 29, 2008 5:55 pm   Post subject: RE:How do you control/move 2 objects

you could use processes if you don't understand the loop thing, but they're pretty inefficient and should really only be used for sounds and music when possible
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  [ 5 Posts ]
Jump to:   


Style:  
Search: