Difference between revisions of "Floor player detect"
From Unofficial QEdit Wiki Guide
Japanaman2 (Talk | contribs) |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | This opcode is misnamed. The opcode is actually detecting which players exist in the game currently. To figure out which floor number a player is on, see get_floor_number. | ||
+ | |||
==Syntax== | ==Syntax== | ||
''Syntax:'' <span style='font-size:12px;font-family:courier'><span style='color:red'>floor_player_detect </span>register1</span> | ''Syntax:'' <span style='font-size:12px;font-family:courier'><span style='color:red'>floor_player_detect </span>register1</span> | ||
Line 6: | Line 8: | ||
4 registers | 4 registers | ||
− | 1st register = | + | 1st register = Red gem. |
− | 2nd register = | + | |
− | 3rd register = | + | 2nd register = Green gem. |
− | 4th register = | + | |
+ | 3rd register = Yellow gem. | ||
+ | |||
+ | 4th register = Blue gem. | ||
+ | |||
+ | Values. | ||
− | + | 00000000 = Player does not exist in the game. | |
− | + | 00000001 = Player does exist in the game. | |
− | 00000001 = Player | + | |
==Use== | ==Use== | ||
− | Used to | + | Used to set a register based on the players slot number if a player exists in the game. |
==Example== | ==Example== | ||
Line 24: | Line 30: | ||
<span style='color:green'> ret </span> | <span style='color:green'> ret </span> | ||
<span style='color:blue'>101: </span><span style='color:green'>sync </span> <span style='color:orange'>//Waits 1 frame.</span> | <span style='color:blue'>101: </span><span style='color:green'>sync </span> <span style='color:orange'>//Waits 1 frame.</span> | ||
− | <span style='color:red'> floor_player_detect </span>R1 | + | <span style='color:red'> floor_player_detect </span>R1 |
<span style='color:green'> jmp </span>101 <span style='color:orange'>//Jumps to function 101.</span> | <span style='color:green'> jmp </span>101 <span style='color:orange'>//Jumps to function 101.</span> | ||
</span> | </span> |
Latest revision as of 21:37, 27 December 2022
This opcode is misnamed. The opcode is actually detecting which players exist in the game currently. To figure out which floor number a player is on, see get_floor_number.
Contents
Syntax
Syntax: floor_player_detect register1
- register1 = Start of continuous registers.
4 registers
1st register = Red gem.
2nd register = Green gem.
3rd register = Yellow gem.
4th register = Blue gem.
Values.
00000000 = Player does not exist in the game.
00000001 = Player does exist in the game.
Use
Used to set a register based on the players slot number if a player exists in the game.
Example
100: thread_stg 101 //Threads function 101 for as long as you are on the current floor.
ret
101: sync //Waits 1 frame.
floor_player_detect R1
jmp 101 //Jumps to function 101.
Also see
thread_stg, ret, sync, jmp,