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

Username:   Password: 
 RegisterRegister   
 Help with getting WASD to work?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Kizznez




PostPosted: Tue May 11, 2010 10:55 am   Post subject: Help with getting WASD to work?

What is it you are trying to achieve?
I am trying to make a two player game that uses the arrows and WASD.

What is the problem you are having?
I can't figure out how to use WSAD.


Describe what you have tried to solve this problem
I've tried using (KEY_LEFT_ARROW_A) and (KEY_LEFT_A) and neither work.


Please specify what version of Turing you are using
I am using a newest version of turing.
Sponsor
Sponsor
Sponsor
sponsor
DemonWasp




PostPosted: Tue May 11, 2010 11:10 am   Post subject: RE:Help with getting WASD to work?

Note that the specification of the variable you pass to Input.KeyDown is array char of boolean. Now, try indexing it with characters, like 'a':

Turing:

var keys : array char of boolean
Input.KeyDown ( keys )
if ( keys ( 'a' ) ) then
    ...
end if


Edit: forgot Turing used () to index arrays, not [].
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: