Restore paletteX
From Unofficial QEdit Wiki Guide
Contents
Syntax
Syntax: restore_paletteX register
- register = Reserved register 250 players slot number.
Use
Restores x button (or <- action palette) to what the player has setup for the x button (or <- action palette).
Example
100: get_slotnumber R250 //Stores the players slot number in register 250.
call 101 //Calls function 101.
thread_stg 106 //Threads function 106 until the player leaves the current floor.
ret
101: set_paletteX_callback R250, 105 //When paletteX is activated and enabled player in slot register 250 will call function 105 when x button (or <- action palette) is pressed.
ret
102: activate_paletteX R250 //Allows for x button (or <- action palette) to be changed to the call script function button.
enable_paletteX R250 //Changes the x button (or <- action palette) to the call script function button.
ret
103: disable_paletteX R250 //Removes the call script function button from x button (or <- action palette).
restore_paletteX R250 //Restores x button (or <- action palette) to what the player has setup for the x button (or <- action palette).
ret
104: call 102 //Calls function 102.(Function 104 would go on or be part of a forest console('s) function.)
window_msg PaletteX has been swapped with<cr>the call function button<cr>and is ready to be pressed. //Displays a window message.
winend //Closes the window message.
ret
105: call 103 //Calls function 103.
window_msg paletteX (or <- action palette)<cr>has been pressed. //Displays a window message.
winend //Closes the window message.
ret
106: sync //Waits 1 frame.
get_paletteX_activated R250, R1 //Makes register 1 equal 00000000 if paletteX (or <- action palette) is not ready to be pressed. Makes register 1 equal 00000001 if paletteX (or <- action palette) is ready to be pressed.
jmp 106 //Jumps to function 106.
Also see
get_slotnumber, call, ret, thread_stg,
set_paletteX_callback, activate_paletteX, enable_paletteX,
disable_paletteX, restore_paletteX, window_msg, winend,