Difference between revisions of "00E1"

From GTAMods Wiki
Jump to navigation Jump to search
(updating page + button names)
(all values named, using icons instead)
Line 1: Line 1:
{{Icon|trilogy}}
+
{{Icon|trilogy}} '''IS_BUTTON_PRESSED'''
 
<hr />
 
<hr />
<onlyinclude>{{#ifeq:{{{transcludesection|opcode}}}|opcode|
 
 
'''Description'''
 
'''Description'''
 
: Checks if a button is pressed
 
: Checks if a button is pressed
Line 8: Line 7:
 
'''Parameter'''
 
'''Parameter'''
 
: [''int1'']
 
: [''int1'']
:: Pad - normally 0 for pad 1 (player 1), 1 for pad 2 (player 2)
+
:: Pad, normally 0 for pad 1 (player 1), 1 for pad 2 (player 2)
 
: [''int2'']
 
: [''int2'']
 
:: Button index
 
:: Button index
Line 15: Line 14:
  
 
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.
 
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.
}}</onlyinclude>
 
  
{|{{Prettytable}}
+
{| class="wikitable"
 
! Index
 
! Index
 
! Button
 
! Button
Line 24: Line 22:
 
|-
 
|-
 
| 0{{Ref|1|[*]}}
 
| 0{{Ref|1|[*]}}
|  
+
| LEFTSTICKX
| Left / Right
+
| {{Icon|t}} Left / Right
| Steer Left / Right
+
| {{Icon|t}} Steer Left / Right
 
|-
 
|-
 
| 1{{Ref|1|[*]}}
 
| 1{{Ref|1|[*]}}
|  
+
| LEFTSTICKY
| Foward / Backwards
+
| {{Icon|t}} Foward / Backwards
| Steer Foward / Backward
+
| {{Icon|t}} Steer Foward / Backward
 
|-
 
|-
 
| 2{{Ref|1|[*]}}
 
| 2{{Ref|1|[*]}}
|
+
| RIGHTSTICKX
| Special Ctrl Left / Right
+
| {{Icon|t}} Special Ctrl Left / Right
 
|-
 
|-
 
| 3{{Ref|1|[*]}}
 
| 3{{Ref|1|[*]}}
|  
+
| RIGHTSTICKY
| Special Ctrl Up / Down
+
| {{Icon|t}} Special Ctrl Up / Down
 
|-
 
|-
 
| 4
 
| 4
 
| LEFTSHOULDER1
 
| LEFTSHOULDER1
| Action (VC, SA)
+
| {{Icon|VC}} {{Icon|SA}} Action
| Radio (VC), Secondary Fire (SA)
+
| {{Icon|VC}} Radio<br />{{Icon|SA}} Secondary Fire
 
|-
 
|-
 
| 5
 
| 5
 
| LEFTSHOULDER2
 
| LEFTSHOULDER2
| Previous Weapon / Zoom In
+
| {{Icon|t}} Previous Weapon / Zoom In
| Look Left
+
| {{Icon|t}} Look Left
 
|-
 
|-
 
| 6
 
| 6
 
| RIGHTSHOULDER1
 
| RIGHTSHOULDER1
| Aim
+
| {{Icon|t}} Aim
| Handbrake
+
| {{Icon|t}} Handbrake
 
|-
 
|-
 
| 7
 
| 7
 
| RIGHTSHOULDER2
 
| RIGHTSHOULDER2
| Next Weapon / Zoom Out
+
| {{Icon|t}} Next Weapon / Zoom Out
| Look Right
+
| {{Icon|t}} Look Right
 
|-
 
|-
 
| 8
 
| 8
 
| DPADUP
 
| DPADUP
| Forward (VC), Group Ctrl Back (SA)
+
| {{Icon|VC}} Forward<br />{{Icon|SA}} Group Ctrl Back
| Next Radio Station (SA)
+
| {{Icon|SA}} Next Radio Station
 
|-
 
|-
 
| 9
 
| 9
 
| DPADDOWN
 
| DPADDOWN
| Backward (VC), Group Ctrl Foward (SA)
+
| {{Icon|VC}} Backward<br />{{Icon|SA}} Group Ctrl Foward
| Previous Radio Station (SA)
+
| {{Icon|SA}} Previous Radio Station
 
|-
 
|-
 
| 10
 
| 10
 
| DPADLEFT
 
| DPADLEFT
| Strafe Left (VC), Conversation - No (SA)
+
| {{Icon|VC}} Strafe Left<br />{{Icon|SA}} Conversation - No
| Steer Left (VC), No (SA)
+
| {{Icon|VC}} Steer Left<br />{{Icon|SA}} No
 
|-
 
|-
 
| 11
 
| 11
 
| DPADRIGHT
 
| DPADRIGHT
| Strafe Right (VC), Conversation - Yes (SA)
+
| {{Icon|VC}} Strafe Right<br />{{Icon|SA}} Conversation - Yes
| Steer Right (VC), Yes (SA), Trip Skip (SA)
+
| {{Icon|VC}} Steer Right<br />{{Icon|SA}} Yes, Trip Skip
 
|-
 
|-
 
| 12
 
| 12
Line 88: Line 86:
 
| 13
 
| 13
 
| SELECT
 
| SELECT
| colspan="2" align="center" | Change Camera
+
| colspan="2" align="center" | {{Icon|t}} Change Camera
 
|-
 
|-
 
| 14
 
| 14
 
| SQUARE
 
| SQUARE
| Jump
+
| {{Icon|t}} Jump
| Brake / Reverse
+
| {{Icon|t}} Brake / Reverse
 
|-
 
|-
 
| 15
 
| 15
 
| TRIANGLE
 
| TRIANGLE
| colspan="2" align="center" | Enter / Exit
+
| colspan="2" align="center" | {{Icon|t}} Enter / Exit
 
|-
 
|-
 
| 16
 
| 16
 
| CROSS
 
| CROSS
| Sprint
+
| {{Icon|t}} Sprint
| Accelerate
+
| {{Icon|t}} Accelerate
 
|-
 
|-
 
| 17
 
| 17
 
| CIRCLE
 
| CIRCLE
| colspan="2" align="center" | Attack
+
| colspan="2" align="center" | {{Icon|t}} Attack
 
|-
 
|-
 
| 18
 
| 18
 
| LEFTSHOCK
 
| LEFTSHOCK
| Crouch (VC, SA)
+
| {{Icon|VC}} {{Icon|SA}} Crouch
| Horn
+
| {{Icon|t}} Horn
 
|-
 
|-
 
| 19
 
| 19
 
| RIGHTSHOCK
 
| RIGHTSHOCK
| Look Behind
+
| {{Icon|t}} Look Behind
| Sub-mission
+
| {{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, button
  
 
[[Category:OpCodes]]
 
[[Category:OpCodes]]

Revision as of 04:07, 6 January 2015

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

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[*] LEFTSTICKX GTA III Vice City San Andreas Left / Right GTA III Vice City San Andreas Steer Left / Right
1[*] LEFTSTICKY GTA III Vice City San Andreas Foward / Backwards GTA III Vice City San Andreas Steer Foward / Backward
2[*] RIGHTSTICKX GTA III Vice City San Andreas Special Ctrl Left / Right
3[*] RIGHTSTICKY GTA III Vice City San Andreas Special Ctrl Up / Down
4 LEFTSHOULDER1 Vice City San Andreas Action Vice City Radio
San Andreas Secondary Fire
5 LEFTSHOULDER2 GTA III Vice City San Andreas Previous Weapon / Zoom In 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 / Zoom Out GTA III Vice City San Andreas Look Right
8 DPADUP Vice City Forward
San Andreas Group Ctrl Back
San Andreas Next Radio Station
9 DPADDOWN Vice City Backward
San Andreas Group Ctrl Foward
San Andreas Previous Radio Station
10 DPADLEFT Vice City Strafe Left
San Andreas Conversation - No
Vice City Steer Left
San Andreas No
11 DPADRIGHT Vice City Strafe Right
San Andreas Conversation - Yes
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 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 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, button