Difference between revisions of "00E1"

From GTAMods Wiki
Jump to navigation Jump to search
(updating page + button names)
Line 1: Line 1:
{{OpCode
+
{{Icon|trilogy}}
| ini        = 00E1=2,  %1d% %2d%
+
<hr />
| description = Checks if a key is pressed
+
<onlyinclude>{{#ifeq:{{{transcludesection|opcode}}}|opcode|
| p1          = Joypad number (always 0)
+
'''Description'''
| p2          = Keypress number
+
: Checks if a button is pressed
| game        = [[GTA 3]], [[Vice City]], [[San Andreas]]
+
'''Syntax'''
}}
+
: 00E1: &nbsp; 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'''
 +
: [[IS_BUTTON_PRESSED]]
  
'''Parameter 1'''
+
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 keys being pressed. If [[CLEO]] is installed, use opcode [[0AB0]] for San Andreas or [[05EE]] for GTA III and Vice City to get a specific key on a keyboard.
0 = Player 1
+
}}</onlyinclude>
1 = Player 2
 
This opcode checks if a key assigned to a function in the game is pressed. The [[GXT#Keypresses|GXT]] file can help display the keys being pressed. Use opcode [[0AB0]] to get a specific key on a keyboard.
 
  
{|{{Prettytable}} class="collapsible"
+
{|{{Prettytable}}
! Number
+
! Index
!width="250px"| On foot
+
! Button
!width="250px"| In a vehicle
+
! width="250px"| On foot
 +
! width="250px"| In a vehicle
 
|-
 
|-
 
| 0{{Ref|1|[*]}}
 
| 0{{Ref|1|[*]}}
 +
|
 
| Left / Right
 
| Left / Right
 
| Steer Left / Right
 
| Steer Left / Right
 
|-
 
|-
 
| 1{{Ref|1|[*]}}
 
| 1{{Ref|1|[*]}}
 +
|
 
| Foward / Backwards
 
| Foward / Backwards
 
| Steer Foward / Backward
 
| Steer Foward / Backward
Line 34: Line 42:
 
|-
 
|-
 
| 4
 
| 4
 +
| LEFTSHOULDER1
 
| Action (VC, SA)
 
| Action (VC, SA)
 
| Radio (VC), Secondary Fire (SA)
 
| Radio (VC), Secondary Fire (SA)
 
|-
 
|-
 
| 5
 
| 5
 +
| LEFTSHOULDER2
 
| Previous Weapon / Zoom In
 
| Previous Weapon / Zoom In
 
| Look Left
 
| Look Left
 
|-
 
|-
 
| 6
 
| 6
 +
| RIGHTSHOULDER1
 
| Aim
 
| Aim
 
| Handbrake
 
| Handbrake
 
|-
 
|-
 
| 7
 
| 7
 +
| RIGHTSHOULDER2
 
| Next Weapon / Zoom Out
 
| Next Weapon / Zoom Out
 
| Look Right
 
| Look Right
 
|-
 
|-
 
| 8
 
| 8
 +
| DPADUP
 
| Forward (VC), Group Ctrl Back (SA)
 
| Forward (VC), Group Ctrl Back (SA)
 
| Next Radio Station (SA)
 
| Next Radio Station (SA)
 
|-
 
|-
 
| 9
 
| 9
 +
| DPADDOWN
 
| Backward (VC), Group Ctrl Foward (SA)
 
| Backward (VC), Group Ctrl Foward (SA)
 
| Previous Radio Station (SA)
 
| Previous Radio Station (SA)
 
|-
 
|-
 
| 10
 
| 10
 +
| DPADLEFT
 
| Strafe Left (VC), Conversation - No (SA)
 
| Strafe Left (VC), Conversation - No (SA)
 
| Steer Left (VC), No (SA)
 
| Steer Left (VC), No (SA)
 
|-
 
|-
 
| 11
 
| 11
 +
| DPADRIGHT
 
| Strafe Right (VC), Conversation - Yes (SA)
 
| Strafe Right (VC), Conversation - Yes (SA)
 
| Steer Right (VC), Yes (SA), Trip Skip (SA)
 
| Steer Right (VC), Yes (SA), Trip Skip (SA)
 +
|-
 +
| 12
 +
| START
 +
|
 +
|
 
|-
 
|-
 
| 13
 
| 13
 +
| SELECT
 
| colspan="2" align="center" | Change Camera
 
| colspan="2" align="center" | Change Camera
 
|-
 
|-
 
| 14
 
| 14
 +
| SQUARE
 
| Jump
 
| Jump
 
| Brake / Reverse
 
| Brake / Reverse
 
|-
 
|-
 
| 15
 
| 15
 +
| TRIANGLE
 
| colspan="2" align="center" | Enter / Exit
 
| colspan="2" align="center" | Enter / Exit
 
|-
 
|-
 
| 16
 
| 16
 +
| CROSS
 
| Sprint
 
| Sprint
 
| Accelerate
 
| Accelerate
 
|-
 
|-
 
| 17
 
| 17
 +
| CIRCLE
 
| colspan="2" align="center" | Attack
 
| colspan="2" align="center" | Attack
 
|-
 
|-
 
| 18
 
| 18
 +
| LEFTSHOCK
 
| Crouch (VC, SA)
 
| Crouch (VC, SA)
 
| Horn
 
| Horn
 
|-
 
|-
 
| 19
 
| 19
 +
| RIGHTSHOCK
 
| Look Behind
 
| Look Behind
 
| Sub-mission
 
| Sub-mission
Line 94: Line 122:
 
==Keywords==
 
==Keywords==
 
keypress, key, press, button
 
keypress, key, press, button
 +
 +
[[Category:OpCodes]]

Revision as of 09:56, 4 January 2012

GTA III Vice City San Andreas


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

IS_BUTTON_PRESSED

This opcode returns true if a button assigned to a function in the game is being pressed. The GXT file can help display the keys being pressed. If CLEO is installed, use opcode 0AB0 for San Andreas or 05EE for GTA III and Vice City to get a specific key on a keyboard.

Index Button On foot In a vehicle
0[*] Left / Right Steer Left / Right
1[*] Foward / Backwards Steer Foward / Backward
2[*] Special Ctrl Left / Right
3[*] Special Ctrl Up / Down
4 LEFTSHOULDER1 Action (VC, SA) Radio (VC), Secondary Fire (SA)
5 LEFTSHOULDER2 Previous Weapon / Zoom In Look Left
6 RIGHTSHOULDER1 Aim Handbrake
7 RIGHTSHOULDER2 Next Weapon / Zoom Out Look Right
8 DPADUP Forward (VC), Group Ctrl Back (SA) Next Radio Station (SA)
9 DPADDOWN Backward (VC), Group Ctrl Foward (SA) Previous Radio Station (SA)
10 DPADLEFT Strafe Left (VC), Conversation - No (SA) Steer Left (VC), No (SA)
11 DPADRIGHT Strafe Right (VC), Conversation - Yes (SA) Steer Right (VC), Yes (SA), Trip Skip (SA)
12 START
13 SELECT Change Camera
14 SQUARE Jump Brake / Reverse
15 TRIANGLE Enter / Exit
16 CROSS Sprint Accelerate
17 CIRCLE Attack
18 LEFTSHOCK Crouch (VC, SA) Horn
19 RIGHTSHOCK Look Behind Sub-mission

^ Use opcode 0494 to get specific key presses

Keywords

keypress, key, press, button