Page 1 of 1

Controlling with w and s

Posted: Mon Jan 13, 2014 4:22 pm
by jgordon
My partner and I are trying to create a two player pong game. We were able to get the right paddle to move and reset according to the size of the card. It moves with the up and down arrow keys. We were wondering how to make the left paddle move with w and s.

Re: Controlling with w and s

Posted: Mon Jan 13, 2014 4:35 pm
by dunbarx
Hi.

Do you mean the "w" and "s" keys? That when you press either of those the paddle will move?

If so, try this in the card script:

Code: Select all

on keydown var
   put var
end keydown
When you hit a key, its value appears in the message box. Can you take this idea and make your paddle work? You may want to filter so that only those two keys work this way, and do think about whether you ever want to type text into a field. Write back if you need more...

Craig Newman

Re: Controlling with w and s

Posted: Mon Jan 13, 2014 7:45 pm
by jgordon
Thank you!