Difference between revisions of "Set paletteX callback"
From Unofficial QEdit Wiki Guide
Japanaman2 (Talk | contribs) |
Japanaman2 (Talk | contribs) |
||
Line 16: | Line 16: | ||
<span style='color:green'> call </span>101 <span style='color:orange'>//calls function 101.</span> | <span style='color:green'> call </span>101 <span style='color:orange'>//calls function 101.</span> | ||
<span style='color:green'> ret </span> | <span style='color:green'> ret </span> | ||
− | <span style='color:blue'>101: </span><span style='color:red'>set_paletteX_callback </span>R250 105<span style='color:orange'>//When paletteX is activated and enabled player in slot register 250 will call function 105 when x button (or <- action palette) is pressed.</span> | + | <span style='color:blue'>101: </span><span style='color:red'>set_paletteX_callback </span>R250, 105<span style='color:orange'>//When paletteX is activated and enabled player in slot register 250 will call function 105 when x button (or <- action palette) is pressed.</span> |
<span style='color:green'> ret </span> | <span style='color:green'> ret </span> | ||
<span style='color:blue'>102: </span><span style='color:red'>activate_paletteX </span>R250 <span style='color:orange'>//Allows for x button (or <- action palette) to be changed to the call script function button.</span> | <span style='color:blue'>102: </span><span style='color:red'>activate_paletteX </span>R250 <span style='color:orange'>//Allows for x button (or <- action palette) to be changed to the call script function button.</span> |
Revision as of 01:31, 15 May 2013
Contents
Syntax
Syntax: set_paletteX_callback register1, function
- register1 = Reserved register 250 players slot number.
- function = Function to call.
Use
Used to define what function should be called when paletteX (or <- action palette) is activated and enabled.
Note: The function containing this op code is usually called from the floor handlers function.
Example
100: get_slotnumber R250 //Stores the players slot number in register 250.
call 101 //calls function 101.
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
Also see
get_slotnumber, call, ret, set_paletteX_callback,