Call of Duty 4: Scripting Reference - Player::ButtonPressed: Difference between revisions
Jump to navigation
Jump to search
(New page: {{Function |Version=4 |Name=ButtonPressed( <buttonName> ) |Module=Player |Available=MP Only |Summary=Check if the host is pressing the button/key, "BUTTON_A", "BUTTON_B", "K |Call_on...) |
mNo edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
|Name=ButtonPressed( <buttonName> ) | |Name=ButtonPressed( <buttonName> ) | ||
|Module=Player | |Module=Player | ||
|Available=MP Only | |Available=SP Only (PC) / MP Only (Consoles)? | ||
|Summary=Check if the host is pressing the button/key | |Summary=Check if the host is pressing the button/key | ||
|Call_on=The player (it will only check the host player's buttons though) | |Call_on=The player (it will only check the host player's buttons though) | ||
|Example=<pre>while( self ButtonPressed( "BUTTON_A" ) ) ...</pre> | |Example=<pre>while( self ButtonPressed( "BUTTON_A" ) ) ...</pre> | ||
|Required_args=Button name string | |||
|Notes=The function is known in PC executables, but works in SP only. Appears to be truncated in MP (function declared without code body in source code). | |||
<br> | |||
Controller: | |||
* "DPAD_RIGHT" | |||
* "DPAD_LEFT" | |||
* "DPAD_UP" | |||
* "DPAD_DOWN" | |||
* "BUTTON_A" | |||
* "BUTTON_B" | |||
* "BUTTON_X" | |||
* "BUTTON_Y" | |||
* "BUTTON_LSHLDR" | |||
* "BUTTON_RSHLDR" | |||
* "BUTTON_START" | |||
* "BUTTON_BACK" | |||
* "BUTTON_LSTICK" | |||
* "BUTTON_RSTICK" | |||
* "BUTTON_LTRIG" | |||
* "BUTTON_RTRIG" | |||
PC: | |||
* "a" - "z" and "0" - "9" | |||
* "f1" - "f12" | |||
* "shift" | |||
* "ctrl" | |||
* "alt" | |||
* "space" | |||
* "tab" | |||
* "escape" | |||
* "enter" | |||
* "kp_ins" (kp = key pad / numpad) | |||
* "kp_end" | |||
* "kp_downarrow" | |||
* "kp_pgdn" | |||
* "kp_leftarrow" | |||
* "kp_5" | |||
* "kp_rightarrow" | |||
* "kp_home" | |||
* "kp_uparrow" | |||
* "kp_pgup" | |||
* "kp_slash" | |||
* ... | |||
}} | }} | ||
Key binding names: | |||
http://bluesuncorp.co.uk/article/cs-source-binding-reference |