User Tools

Site Tools


crpl:docs:getkeydown

This is an old revision of the document!


~~DISCUSSION~~ <- CRPL reference <- Input Commands

GetKeyDown

ArgumentsResultNotation
Key to check 0 or 1 depending if Key was pressed s1 – b1

Description

Checks the specified keyboard key to see if it is was pressed during this game frame. Returns true only once during the game frame/loop that the key was pressed. For a list of possible key strings, look here: http://docs.unity3d.com/Documentation/ScriptReference/KeyCode.html

Examples

if (GetKeyDown("Space"))
   #Fire a single shot.
endif
crpl/docs/getkeydown.1374179900.txt.gz · Last modified: 2014/10/01 15:02 (external edit)