Difference between revisions of "00E1"

From GTAMods Wiki
Jump to navigation Jump to search
(more for iii)
Line 1: Line 1:
{{Icon|trilogy}} '''IS_BUTTON_PRESSED'''
+
{{OpCode
<hr />
+
| games      = {{Icon|t}}
'''Description'''
+
| command    = IS_BUTTON_PRESSED
: Checks if a button is pressed
+
| description = Checks if a button is pressed
'''Syntax'''
+
| syntax1    = 00E1: &nbsp; key_pressed [''int1''] [''int2'']
: 00E1: &nbsp; key_pressed [''int1''] [''int2'']
+
| p1t        = [''int1'']
'''Parameter'''
+
| p1d        = Pad, normally 0 for pad 1 (player 1), 1 for pad 2 (player 2)
: [''int1'']
+
| p2t        = [''int2'']
:: Pad, normally 0 for pad 1 (player 1), 1 for pad 2 (player 2)
+
| p2d        = Button index (see below)
: [''int2'']
+
| native      = [[IS_BUTTON_PRESSED]]
:: Button index
+
}}
'''Native analog'''
 
: [[IS_BUTTON_PRESSED]]
 
  
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.
+
This conditional opcode returns true if a button assigned to a function in the game is being pressed. The [[GXT#Buttons|GXT]] file can display on screen specific buttons assigned to the action. 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"
Line 23: Line 21:
 
| 0{{Ref|1|[*]}}
 
| 0{{Ref|1|[*]}}
 
| LEFTSTICKX
 
| LEFTSTICKX
| {{Icon|t}} Left / Right
+
| {{Icon|VC}} {{Icon|SA}} Left / Right
| {{Icon|t}} Steer Left / Right
+
| {{Icon|VC}} {{Icon|SA}} Steer Left / Right
 
|-
 
|-
 
| 1{{Ref|1|[*]}}
 
| 1{{Ref|1|[*]}}
 
| LEFTSTICKY
 
| LEFTSTICKY
| {{Icon|t}} Foward / Backwards
+
| {{Icon|VC}} {{Icon|SA}} Foward / Backwards
| {{Icon|t}} Steer Foward / Backward
+
| {{Icon|VC}} {{Icon|SA}} Steer Foward / Backward
 
|-
 
|-
 
| 2{{Ref|1|[*]}}
 
| 2{{Ref|1|[*]}}
Line 44: Line 42:
 
| LEFTSHOULDER1
 
| LEFTSHOULDER1
 
| {{Icon|VC}} {{Icon|SA}} Action
 
| {{Icon|VC}} {{Icon|SA}} Action
| {{Icon|VC}} Radio<br />{{Icon|SA}} Secondary Fire
+
| {{Icon|3}} {{Icon|VC}} Radio<br />{{Icon|SA}} Secondary Fire
 
|-
 
|-
 
| 5
 
| 5
Line 63: Line 61:
 
| 8
 
| 8
 
| DPADUP
 
| DPADUP
| {{Icon|VC}} Forward<br />{{Icon|SA}} Group Ctrl Back
+
| {{Icon|3}} {{Icon|VC}} Forward<br />{{Icon|SA}} Group Ctrl Back
 
| {{Icon|SA}} Next Radio Station
 
| {{Icon|SA}} Next Radio Station
 
|-
 
|-
 
| 9
 
| 9
 
| DPADDOWN
 
| DPADDOWN
| {{Icon|VC}} Backward<br />{{Icon|SA}} Group Ctrl Foward
+
| {{Icon|3}} {{Icon|VC}} Backward<br />{{Icon|SA}} Group Ctrl Foward
 
| {{Icon|SA}} Previous Radio Station
 
| {{Icon|SA}} Previous Radio Station
 
|-
 
|-
 
| 10
 
| 10
 
| DPADLEFT
 
| DPADLEFT
| {{Icon|VC}} Strafe Left<br />{{Icon|SA}} Conversation - No
+
| {{Icon|3}} {{Icon|VC}} Strafe Left<br />{{Icon|SA}} Conversation - No
| {{Icon|VC}} Steer Left<br />{{Icon|SA}} No
+
| {{Icon|3}} {{Icon|VC}} Steer Left<br />{{Icon|SA}} No
 
|-
 
|-
 
| 11
 
| 11
 
| DPADRIGHT
 
| DPADRIGHT
| {{Icon|VC}} Strafe Right<br />{{Icon|SA}} Conversation - Yes
+
| {{Icon|3}} {{Icon|VC}} Strafe Right<br />{{Icon|SA}} Conversation - Yes
| {{Icon|VC}} Steer Right<br />{{Icon|SA}} Yes, Trip Skip
+
| {{Icon|3}} {{Icon|VC}} Steer Right<br />{{Icon|SA}} Yes, Trip Skip
 
|-
 
|-
 
| 12
 
| 12
Line 121: Line 119:
  
 
== Keywords ==
 
== Keywords ==
keypress, key, press, button
+
keypress, key, press, pressed, button
  
 
== See also ==
 
== See also ==
 
* {{Icon|3}} {{Icon|SA}} [[00E2]], gets the pad state
 
* {{Icon|3}} {{Icon|SA}} [[00E2]], gets the pad state
 
* {{Icon|t}} [[0494]], gets the position of the analogue sticks
 
* {{Icon|t}} [[0494]], gets the position of the analogue sticks
 
[[Category:OpCodes]]
 

Revision as of 10:45, 26 February 2016

GTA III Vice City San Andreas IS_BUTTON_PRESSED


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 (see below)
Native analog
IS_BUTTON_PRESSED

This conditional opcode returns true if a button assigned to a function in the game is being pressed. The GXT file can display on screen specific buttons assigned to the action. 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 Vice City San Andreas Left / Right Vice City San Andreas Steer Left / Right
1[*] LEFTSTICKY Vice City San Andreas Foward / Backwards Vice City San Andreas Steer Foward / Backward
2[*] RIGHTSTICKX GTA III Vice City San Andreas Special Ctrl Left / Right GTA III Vice City San Andreas Turret Left / Right
3[*] RIGHTSTICKY GTA III Vice City San Andreas Special Ctrl Up / Down GTA III Vice City San Andreas Turret Up / Down, Lean Up / Down
4 LEFTSHOULDER1 Vice City San Andreas Action GTA III Vice City Radio
San Andreas Secondary Fire
5 LEFTSHOULDER2 GTA III Vice City San Andreas Previous Weapon GTA III Vice City San Andreas Look Left
6 RIGHTSHOULDER1 GTA III Vice City San Andreas Aim GTA III Vice City San Andreas Handbrake
7 RIGHTSHOULDER2 GTA III Vice City San Andreas Next Weapon GTA III Vice City San Andreas Look Right
8 DPADUP GTA III Vice City Forward
San Andreas Group Ctrl Back
San Andreas Next Radio Station
9 DPADDOWN GTA III Vice City Backward
San Andreas Group Ctrl Foward
San Andreas Previous Radio Station
10 DPADLEFT GTA III Vice City Strafe Left
San Andreas Conversation - No
GTA III Vice City Steer Left
San Andreas No
11 DPADRIGHT GTA III Vice City Strafe Right
San Andreas Conversation - Yes
GTA III Vice City Steer Right
San Andreas Yes, Trip Skip
12 START
13 SELECT GTA III Vice City San Andreas Change Camera
14 SQUARE GTA III Vice City San Andreas Jump / Zoom In GTA III Vice City San Andreas Brake / Reverse
15 TRIANGLE GTA III Vice City San Andreas Enter / Exit
16 CROSS GTA III Vice City San Andreas Sprint / Zoom Out GTA III Vice City San Andreas Accelerate
17 CIRCLE GTA III Vice City San Andreas Attack
18 LEFTSHOCK Vice City San Andreas Crouch GTA III Vice City San Andreas Horn
19 RIGHTSHOCK GTA III Vice City San Andreas Look Behind GTA III Vice City San Andreas Sub-mission

^ Use opcode 0494 to get specific key presses

Keywords

keypress, key, press, pressed, button

See also

  • GTA III San Andreas 00E2, gets the pad state
  • GTA III Vice City San Andreas 0494, gets the position of the analogue sticks