Call of Duty 4: Scripting Reference - Player::ButtonPressed: Difference between revisions

From COD Modding & Mapping Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 4: Line 4:
|Module=Player
|Module=Player
|Available=MP Only (Consoles)
|Available=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)
|Example=<pre>while( self ButtonPressed( "BUTTON_A" ) ) ...</pre>
|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_RIGHT"
* "DPAD_LEFT"
* "DPAD_LEFT"
Line 21: Line 26:
* "BUTTON_LTRIG"
* "BUTTON_LTRIG"
* "BUTTON_RTRIG"
* "BUTTON_RTRIG"
|Call_on=The player (it will only check the host player's buttons though)
PC:
|Example=<pre>while( self ButtonPressed( "BUTTON_A" ) ) ...</pre>
* "a" - "z" and "0" - "9"
|Notes=The function is known in PC build but works for console buttons only / might be truncated (function declared without code body).
* "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

Revision as of 15:55, 7 February 2012