Difference between revisions of "Switch call"
From Unofficial QEdit Wiki Guide
Japanaman2 (Talk | contribs) |
(→Use) |
||
Line 7: | Line 7: | ||
==Use== | ==Use== | ||
Used to call to different functions depending on a registers value. | Used to call to different functions depending on a registers value. | ||
+ | |||
+ | NOTE* Going above 16 will crash on Xbox, going above 24 will crash on GC. | ||
==Example== | ==Example== |
Revision as of 00:31, 24 January 2024
Contents
Syntax
Syntax: switch_call register1, string
- register1 = Register to check value
- string = Function list to call on value
Use
Used to call to different functions depending on a registers value.
NOTE* Going above 16 will crash on Xbox, going above 24 will crash on GC.
Example
0: get_slotnumber R250
ret
1: ret
100: switch_call R250, 4:101:102:103:104 //Registers value to check, number of switches, function to call based on the registers value.
101: window_msg 'You are in the red slot.'
winend
ret
102: window_msg 'You are in the green slot.'
winend
ret
103: window_msg 'You are in the yellow slot.'
winend
ret
104: window_msg 'You are in the blue slot.'
winend
ret