Difference between revisions of "Floor player detect"
From Unofficial QEdit Wiki Guide
Japanaman2 (Talk | contribs) |
m (→Example) |
||
Line 28: | Line 28: | ||
<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:orange'>//Finds out of players are on the floor or not and stores a check for each player slot in register 1 (slot 1), register 2 (slot 2), register 3 (slot 3), register 4 (slot 4) if the player is on the floor the value of their slots register will equal 00000001. if the player is not on the floor the value | + | <span style='color:red'> floor_player_detect </span>R1 <span style='color:orange'>//Finds out of players are on the floor or not and stores a check for each |
+ | player slot in register 1 (slot 1), register 2 (slot 2), register 3 | ||
+ | (slot 3), register 4 (slot 4) if the player is on the floor the value of | ||
+ | their slots register will equal 00000001. if the player is not on the | ||
+ | floor the value oftheir slots register will equal 00000000.</span> | ||
<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> |
Revision as of 02:21, 17 June 2014
Contents
Syntax
Syntax: floor_player_detect register1
- register1 = Start of continuous registers.
4 registers
1st register = Value of if red gem player on floor.
2nd register = Value of if green gem player on floor.
3rd register = Value of if yellow gem player on floor.
4th register = Value of if blue gem player on floor?.
Values.
00000000 = Player is not on floor.
00000001 = Player is on floor.
Use
Used to set a register based on the players slot number if a player is on the floor where this op code is encountered.
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 //Finds out of players are on the floor or not and stores a check for each
player slot in register 1 (slot 1), register 2 (slot 2), register 3
(slot 3), register 4 (slot 4) if the player is on the floor the value of
their slots register will equal 00000001. if the player is not on the
floor the value oftheir slots register will equal 00000000.
jmp 101 //Jumps to function 101.
Also see
thread_stg, ret, sync, jmp,