Get floor number

From Unofficial QEdit Wiki Guide
Jump to: navigation, search

Syntax

Syntax: get_floor_number register1, register2

  • 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  //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