
-----------------------------------
ut2004
Wed May 28, 2008 9:40 pm

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.

-----------------------------------
Euphoracle
Wed May 28, 2008 9:52 pm

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
Thu May 29, 2008 6:58 am

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
Thu May 29, 2008 8:05 am

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
Thu May 29, 2008 5:55 pm

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
