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, "BUTTON_A", "BUTTON_B", "K
|Summary=Check if the host is pressing the button/key,
* "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"
|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>
|Notes=The function is known in PC build but works for console buttons only / might be truncated (function declared without code body).
|Notes=The function is known in PC build but works for console buttons only / might be truncated (function declared without code body).
}}
}}

Revision as of 11:50, 12 October 2009