Difference between revisions of "00E1"

From GTAMods Wiki
Jump to navigation Jump to search
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
__NOTOC__
 
{{OpCode
 
{{OpCode
| ini        = 00E1=2,  %1d% %2d%
+
| games      = {{Icon|t}}
| description = Checks if a key is pressed
+
| command    = IS_BUTTON_PRESSED
| p1          = Joypad number (always 0)
+
| description = Checks if the button is pressed
| p2          = Keypress number
+
| syntax1    = 00E1:   key_pressed [''int1''] [''int2'']
| game        = [[GTA 3]], [[Vice City]], [[San Andreas]]
+
| p1t        = [''int1'']
 +
| p1d        = Joypad (normally 0, [[#Joypads|see below]])
 +
| p2t        = [''int2'']
 +
| p2d        = Joypad button ([[#Joypad buttons|see below]])
 +
| native      = [[IS_BUTTON_PRESSED]]
 
}}
 
}}
  
'''Parameter 1'''
+
This conditional opcode returns true if the 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.
0 = Player 1
 
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"
+
== Joypads ==
! Number
+
{|class="wikitable center-col-1"
!width="250px"| On foot
+
!Pad ||[[SCM language III/VC definitions#PAD|Enum]] ||Description
!width="250px"| In a vehicle
 
 
|-
 
|-
| 0{{Ref|1|[*]}}
+
|0 ||PAD1 ||Player 1
| Left / Right
 
| Steer Left / Right
 
 
|-
 
|-
| 1{{Ref|1|[*]}}
+
|1 ||PAD2 ||Player 2
| Foward / Backwards
+
|}
| Steer Foward / Backward
+
 
 +
== Joypad buttons ==
 +
{| class="wikitable center-col-1"
 +
!Button
 +
![[SCM language III/VC definitions#BUTTON|Enum]]
 +
!style="width: 20em;" |On foot
 +
!style="width: 20em;" |In a vehicle
 
|-
 
|-
| 2{{Ref|1|[*]}}
+
|0{{Ref|1|[*]}}
|
+
|LEFTSTICKX
| Special Ctrl Left / Right
+
|{{Icon|VC}} {{Icon|SA}} Left / Right
 +
|{{Icon|VC}} {{Icon|SA}} Steer Left / Right
 +
|-
 +
|1{{Ref|1|[*]}}
 +
|LEFTSTICKY
 +
|{{Icon|VC}} {{Icon|SA}} Forward / Backwards
 +
|{{Icon|VC}} {{Icon|SA}} Steer Forward / Backward
 +
|-
 +
|2{{Ref|1|[*]}}
 +
|RIGHTSTICKX
 +
|{{Icon|t}} Special Ctrl Left / Right
 +
|{{Icon|t}} Turret Left / Right
 +
|-
 +
|3{{Ref|1|[*]}}
 +
|RIGHTSTICKY
 +
|{{Icon|t}} Special Ctrl Up / Down
 +
|{{Icon|t}} Turret Up / Down, Lean Up / Down
 
|-
 
|-
| 3{{Ref|1|[*]}}
+
|4
|  
+
|LEFTSHOULDER1
| Special Ctrl Up / Down
+
|{{Icon|VC}} {{Icon|SA}} Action
 +
|{{Icon|3}} {{Icon|VC}} Radio<br />{{Icon|SA}} Secondary Fire
 
|-
 
|-
| 4
+
|5
| Action (VC, SA)
+
|LEFTSHOULDER2
| Radio (VC), Secondary Fire (SA)
+
|{{Icon|t}} Previous Weapon
 +
|{{Icon|t}} Look Left
 
|-
 
|-
| 5
+
|6
| Previous Weapon / Zoom In
+
|RIGHTSHOULDER1
| Look Left
+
|{{Icon|t}} Aim
 +
|{{Icon|t}} Handbrake
 
|-
 
|-
| 6
+
|7
| Aim
+
|RIGHTSHOULDER2
| Handbrake
+
|{{Icon|t}} Next Weapon
 +
|{{Icon|t}} Look Right
 
|-
 
|-
| 7
+
|8
| Next Weapon / Zoom Out
+
|DPADUP
| Look Right
+
|{{Icon|3}} {{Icon|VC}} Forward<br />{{Icon|SA}} Group Ctrl Back
 +
|{{Icon|SA}} Next Radio Station
 
|-
 
|-
| 8
+
|9
| Forward (VC), Group Ctrl Back (SA)
+
|DPADDOWN
| Next Radio Station (SA)
+
|{{Icon|3}} {{Icon|VC}} Backward<br />{{Icon|SA}} Group Ctrl Forward
 +
|{{Icon|SA}} Previous Radio Station
 
|-
 
|-
| 9
+
|10
| Backward (VC), Group Ctrl Foward (SA)
+
|DPADLEFT
| Previous Radio Station (SA)
+
|{{Icon|3}} {{Icon|VC}} Strafe Left<br />{{Icon|SA}} Conversation - No
 +
|{{Icon|3}} {{Icon|VC}} Steer Left<br />{{Icon|SA}} No
 
|-
 
|-
| 10
+
|11
| Strafe Left (VC), Conversation - No (SA)
+
|DPADRIGHT
| Steer Left (VC), No (SA)
+
|{{Icon|3}} {{Icon|VC}} Strafe Right<br />{{Icon|SA}} Conversation - Yes
 +
|{{Icon|3}} {{Icon|VC}} Steer Right<br />{{Icon|SA}} Yes, Trip Skip
 
|-
 
|-
| 11
+
|12
| Strafe Right (VC), Conversation - Yes (SA)
+
|START
| Steer Right (VC), Yes (SA), Trip Skip (SA)
+
|
 +
|
 
|-
 
|-
| 13
+
|13
| colspan="2" align="center" | Change Camera
+
|SELECT
 +
|colspan="2" {{a|c}} |{{Icon|t}} Change Camera
 
|-
 
|-
| 14
+
|14
| Jump
+
|SQUARE
| Brake / Reverse
+
|{{Icon|t}} Jump / Zoom In
 +
|{{Icon|t}} Brake / Reverse
 
|-
 
|-
| 15
+
|15
| colspan="2" align="center" | Enter / Exit
+
|TRIANGLE
 +
|colspan="2" {{a|c}} |{{Icon|t}} Enter / Exit
 
|-
 
|-
| 16
+
|16
| Sprint
+
|CROSS
| Accelerate
+
|{{Icon|t}} Sprint / Zoom Out
 +
|{{Icon|t}} Accelerate
 
|-
 
|-
| 17
+
|17
| colspan="2" align="center" | Attack
+
|CIRCLE
 +
|colspan="2" {{a|c}} |{{Icon|t}} Attack
 
|-
 
|-
| 18
+
|18
| Crouch (VC, SA)
+
|LEFTSHOCK
| Horn
+
|{{Icon|VC}} {{Icon|SA}} Crouch
 +
|{{Icon|t}} Horn
 
|-
 
|-
| 19
+
|19
| Look Behind
+
|RIGHTSHOCK
| Sub-mission
+
|{{Icon|t}} Look Behind
 +
|{{Icon|t}} Sub-mission
 
|}
 
|}
 
{{Note|1}} Use opcode [[0494]] to get specific key presses
 
{{Note|1}} Use opcode [[0494]] to get specific key presses
  
==Keywords==
+
== Keywords ==
keypress, key, press, button
+
keypress, key, press, pressed, button
 +
 
 +
== See also ==
 +
* {{Icon|3}} {{Icon|SA}} [[00E2]], gets the pad state
 +
* {{Icon|t}} [[0494]], gets the position of the analogue sticks

Latest revision as of 06:51, 6 December 2016

GTA III Vice City San Andreas IS_BUTTON_PRESSED


Description
Checks if the button is pressed
Syntax
00E1:   key_pressed [int1] [int2]
Parameter
[int1]
Joypad (normally 0, see below)
[int2]
Joypad button (see below)
Native analog
IS_BUTTON_PRESSED

This conditional opcode returns true if the 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.

Joypads

Pad Enum Description
0 PAD1 Player 1
1 PAD2 Player 2

Joypad buttons

Button 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 Forward / Backwards Vice City San Andreas Steer Forward / 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 Forward
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