OnKeyDown
(Difference between revisions)
Dahnielson (Talk | contribs) |
Dahnielson (Talk | contribs) |
||
Line 6: | Line 6: | ||
[[Category:Lua scripting]] | [[Category:Lua scripting]] | ||
+ | [[Category:Lua function]] | ||
+ | [[Category:Input]] |
Revision as of 19:33, 4 February 2014
Check if key has been pressed. While isKeyPressed will return "true" continuously until a key is released, this function will return "true", when the button is pressed down and then "true","false" every few ticks depending on your OS key delay and speed settings.
spaceDown = onKeyDown("SPACE")
You can find key constants here