Difference between revisions of "IsKeyPressed2"

Jump to navigation Jump to search
3 bytes added ,  12:40, 9 August 2006
messed up Note
imported>DragoonWraith
(OBSE)
 
imported>DragoonWraith
(messed up Note)
Line 65: Line 65:
==Notes==
==Notes==


* Bear in mind that this function returns 1 for as long as the key is held down, so it's generally a good idea to trap the key and then wait until it is released, i.e.:<pre>if ( curKey && isKeyPressed curkey ) ; key still being held down
* Bear in mind that this function returns 1 for as long as the key is held down, so it's generally a good idea to trap the key and then wait until it is released, i.e.:
<pre>if ( curKey && isKeyPressed2 curkey ) ; key still being held down
   return ; wait until it's released
   return ; wait until it's released
else
else
Line 71: Line 72:
endif
endif


if ( isKeyPressed <keyCode> )
if ( isKeyPressed2 <keyCode> )
   ; do stuff
   ; do stuff
   set curKey to <keyCode>
   set curKey to <keyCode>

Navigation menu