Difference between revisions of "Get floor number"
From Unofficial QEdit Wiki Guide
Japanaman2 (Talk | contribs) |
|||
Line 2: | Line 2: | ||
''Syntax:'' <span style='font-size:12px;font-family:courier'><span style='color:red'>get_floor_number </span>register1, register2</span> | ''Syntax:'' <span style='font-size:12px;font-family:courier'><span style='color:red'>get_floor_number </span>register1, register2</span> | ||
− | * ''register1'' = | + | * ''register1'' = Register containing slot number to check. |
* ''register2'' = Start of continuous registers. | * ''register2'' = Start of continuous registers. | ||
Line 16: | Line 16: | ||
==Use== | ==Use== | ||
Used to store the floor id the player is on, and the room id the player is in. | Used to store the floor id the player is on, and the room id the player is in. | ||
+ | |||
+ | If the player does not exist in the game, both registers are set to 0xFFFFFFFF (-1). | ||
==Example== | ==Example== |
Latest revision as of 21:38, 27 December 2022
Contents
Syntax
Syntax: get_floor_number register1, register2
- register1 = Register containing slot number to check.
- register2 = Start of continuous registers.
2 registers.
The first register stores the floor id the player is on.
The second register stores the room id the player is in.
Note: Pioneer2/labo will not store there room values in the second register and will be 00000000.
Use
Used to store the floor id the player is on, and the room id the player is in.
If the player does not exist in the game, both registers are set to 0xFFFFFFFF (-1).
Example
100: get_slotnumber R250 //Gets the slot number of the players and stores it in register 250.
thread 101 //Threads function 101.
ret
101: sync //Waits 1 frame.
get_floor_number R250, R1 //Stores the floor id the player is on in register 1, and stores the room id the player is in in register 2.
jmp 101 //Jumps to function 101.