Difference between revisions of "Get floor number"

From Unofficial QEdit Wiki Guide
Jump to: navigation, search
Line 25: Line 25:
 
  <span style='color:blue'>101:    </span><span style='color:green'>sync </span>R250, R1 <span style='color:orange'>//Waits 1 frame.</span>
 
  <span style='color:blue'>101:    </span><span style='color:green'>sync </span>R250, R1 <span style='color:orange'>//Waits 1 frame.</span>
 
  <span style='color:red'>        get_floor_number </span>R250, R1 <span style='color:orange'>//Stores the floor id the player is on in register 1, and stores the room id the player is in in register 2.</span>
 
  <span style='color:red'>        get_floor_number </span>R250, R1 <span style='color:orange'>//Stores the floor id the player is on in register 1, and stores the room id the player is in in register 2.</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>
  
 
==Also see==
 
==Also see==

Revision as of 07:59, 2 May 2013

Syntax

Syntax: get_floor_number register1, register 2

  • register1 = Reserved register 250 for player slot number.
  • 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.

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 R250, R1 //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.
 

Also see

get_slotnumber, thread, ret,

sync, jmp