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 3: Line 3:
|Name=ButtonPressed( <buttonName> )
|Name=ButtonPressed( <buttonName> )
|Module=Player
|Module=Player
|Available=MP Only (Consoles)
|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).
|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>
<br>
Line 49: Line 50:
* ...
* ...
}}
}}


Key binding names:
Key binding names:
http://bluesuncorp.co.uk/article/cs-source-binding-reference
http://bluesuncorp.co.uk/article/cs-source-binding-reference

Latest revision as of 15:58, 7 February 2012