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

Username:   Password: 
 RegisterRegister   
 help changing [Input.Keydown] function
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
That Asian Guy




PostPosted: Fri Nov 02, 2007 3:23 pm   Post subject: help changing [Input.Keydown] function

whenever i use the Input.Keydown command, my keys are read even if i hold it down. how do i change this so tht the pressed key is only detected once, even if it is held?

thx
Sponsor
Sponsor
Sponsor
sponsor
Euphoracle




PostPosted: Fri Nov 02, 2007 5:44 pm   Post subject: RE:help changing [Input.Keydown] function

Create an array of your last KeyDown and crossref it. If they are both true, it is being held down. If the last one is false, it is a new keypress. If the current one is false, well, it was released.
That Asian Guy




PostPosted: Fri Nov 02, 2007 6:38 pm   Post subject: RE:help changing [Input.Keydown] function

well im really new to turing, just learning it at school. so can u please post a little snippet of what i should do?

and btw is there another way to do it? wht if the two presses of the same key are required?
Mazer




PostPosted: Fri Nov 02, 2007 9:06 pm   Post subject: Re: RE:help changing [Input.Keydown] function

That Asian Guy @ Fri Nov 02, 2007 6:38 pm wrote:
wht if the two presses of the same key are required?

Are you really expecting the user to press a key, release it, and press it again all within the span of a single frame? I think you are safe.
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  [ 4 Posts ]
Jump to:   


Style:  
Search: