Get button cond

From Unofficial QEdit Wiki Guide
Revision as of 22:44, 21 September 2024 by Kayak (Talk | contribs)

Jump to: navigation, search

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

Example