Difference between revisions of "00E1"
Jump to navigation
Jump to search
Line 13: | Line 13: | ||
: [[IS_BUTTON_PRESSED]] | : [[IS_BUTTON_PRESSED]] | ||
− | This opcode returns true if a button assigned to a function in the game is being pressed. The [[GXT#Keypresses|GXT]] file can help display the specific key assigned to the function. Opcode [[00E2]] can get the state of the button. If [[CLEO]] is installed, use opcode [[0AB0]] | + | This conditional opcode returns true if a button assigned to a function in the game is being pressed. The [[GXT#Keypresses|GXT]] file can help display the specific key assigned to the function. Opcode [[00E2]] can get the state of the button. If [[CLEO]] is installed, use opcode [[0AB0]] (or [[05EE]] for older versions of CLEO for GTA III and Vice City) to get a specific key on a keyboard. |
{| class="wikitable" | {| class="wikitable" | ||
! Index | ! Index | ||
− | ! | + | ! [[SCM language III/VC definitions#BUTTON|Enum]] |
! style="width: 20em;" | On foot | ! style="width: 20em;" | On foot | ||
! style="width: 20em;" | In a vehicle | ! style="width: 20em;" | In a vehicle | ||
Line 88: | Line 88: | ||
| 13 | | 13 | ||
| SELECT | | SELECT | ||
− | | colspan="2" | + | | colspan="2" {{a|c}} | {{Icon|t}} Change Camera |
|- | |- | ||
| 14 | | 14 | ||
Line 97: | Line 97: | ||
| 15 | | 15 | ||
| TRIANGLE | | TRIANGLE | ||
− | | colspan="2" | + | | colspan="2" {{a|c}} | {{Icon|t}} Enter / Exit |
|- | |- | ||
| 16 | | 16 | ||
Line 106: | Line 106: | ||
| 17 | | 17 | ||
| CIRCLE | | CIRCLE | ||
− | | colspan="2" | + | | colspan="2" {{a|c}} | {{Icon|t}} Attack |
|- | |- | ||
| 18 | | 18 | ||
Line 122: | Line 122: | ||
== Keywords == | == Keywords == | ||
keypress, key, press, button | keypress, key, press, button | ||
+ | |||
+ | == See also == | ||
+ | * {{Icon|3}} {{Icon|SA}} [[00E2]], gets the pad state | ||
+ | * {{Icon|t}} [[0494]], gets the position of the analogue sticks | ||
[[Category:OpCodes]] | [[Category:OpCodes]] |
Revision as of 23:14, 5 December 2015
Description
- Checks if a button is pressed
Syntax
- 00E1: key_pressed [int1] [int2]
Parameter
- [int1]
- Pad, normally 0 for pad 1 (player 1), 1 for pad 2 (player 2)
- [int2]
- Button index
Native analog
This conditional opcode returns true if a button assigned to a function in the game is being pressed. The GXT file can help display the specific key assigned to the function. Opcode 00E2 can get the state of the button. If CLEO is installed, use opcode 0AB0 (or 05EE for older versions of CLEO for GTA III and Vice City) to get a specific key on a keyboard.
Index | Enum | On foot | In a vehicle |
---|---|---|---|
0[*] | LEFTSTICKX | Left / Right | Steer Left / Right |
1[*] | LEFTSTICKY | Foward / Backwards | Steer Foward / Backward |
2[*] | RIGHTSTICKX | Special Ctrl Left / Right | Turret Left / Right |
3[*] | RIGHTSTICKY | Special Ctrl Up / Down | Turret Up / Down, Lean Up / Down |
4 | LEFTSHOULDER1 | Action | Radio Secondary Fire |
5 | LEFTSHOULDER2 | Previous Weapon | Look Left |
6 | RIGHTSHOULDER1 | Aim | Handbrake |
7 | RIGHTSHOULDER2 | Next Weapon | Look Right |
8 | DPADUP | Forward Group Ctrl Back |
Next Radio Station |
9 | DPADDOWN | Backward Group Ctrl Foward |
Previous Radio Station |
10 | DPADLEFT | Strafe Left Conversation - No |
Steer Left No |
11 | DPADRIGHT | Strafe Right Conversation - Yes |
Steer Right Yes, Trip Skip |
12 | START | ||
13 | SELECT | Change Camera | |
14 | SQUARE | Jump / Zoom In | Brake / Reverse |
15 | TRIANGLE | Enter / Exit | |
16 | CROSS | Sprint / Zoom Out | Accelerate |
17 | CIRCLE | Attack | |
18 | LEFTSHOCK | Crouch | Horn |
19 | RIGHTSHOCK | Look Behind | Sub-mission |
^ Use opcode 0494 to get specific key presses
Keywords
keypress, key, press, button