Difference between revisions of "Get button cond"
From Unofficial QEdit Wiki Guide
(Created page with "==Syntax== ''Syntax:'' <span style='font-size:12px;font-family:courier'><span style='color:green'>get_button_cond</span>R1, R2</span> * ''Register 1 needs to be 0'' * ''Regis...") |
|||
Line 12: | Line 12: | ||
Button outputs: | Button outputs: | ||
− | B Button - 0x2 | + | * B Button - 0x2 |
− | A Button - 0x4 | + | * A Button - 0x4 |
− | Start Button - 0x8 on GC | 0x9 on Xbox | + | * Start Button - 0x8 on GC | 0x9 on Xbox |
− | D-Pad Up - 0x10 | + | * D-Pad Up - 0x10 |
− | D-Pad Left - 0x20 | + | * D-Pad Left - 0x20 |
− | D-Pad Down - 0x40 | + | * D-Pad Down - 0x40 |
− | D-Pad Right - 0x80 | + | * D-Pad Right - 0x80 |
− | Z Button & Black/White - 0x100 | + | * Z Button & Black/White - 0x100 |
− | Y Button - 0x200 | + | * Y Button - 0x200 |
− | X Button - 0x400 | + | * X Button - 0x400 |
− | Back Button (Xbox only) - 0x800 | + | * Back Button (Xbox only) - 0x800 |
− | R Button - 1x0 | + | * R Button - 1x0 |
− | L Button - 2x0 | + | * L Button - 2x0 |
+ | |||
+ | ==Example== |
Revision as of 22:44, 21 September 2024
Syntax
Syntax: get_button_condR1, R2
- Register 1 needs to be 0
- Register 2 is the output
Use
Gives an output on what button the player pressed while this code is running. It detects every button on the controller. Does not detect the button if it is already pressed when the code started running.
Button outputs:
- B Button - 0x2
- A Button - 0x4
- Start Button - 0x8 on GC | 0x9 on Xbox
- D-Pad Up - 0x10
- D-Pad Left - 0x20
- D-Pad Down - 0x40
- D-Pad Right - 0x80
- Z Button & Black/White - 0x100
- Y Button - 0x200
- X Button - 0x400
- Back Button (Xbox only) - 0x800
- R Button - 1x0
- L Button - 2x0