If zone clear

From Unofficial QEdit Wiki Guide
Jump to: navigation, search


Syntax: if_zone_clear register1, register2

  • register1 = Register containing the value of if room is cleared or not.

00000000 equals not cleared.

00000001 equals cleared.

  • register2 = Start of the continuous registers, containing the value of...

Starting register contains the value for the floor id.

The next continuous register contains the value for the room id.


Used to preform a check on if a room on a floor has been cleared of enemies or not.


1:       ret 
100:     thread 101 //Threads function 101.
101:     sync  //Waits 1 frame.
         jmpi_= R1, 00000001, 1 //If register 1 equals 00000001 jump to function 1.
         leti R2, 00000003 //Makes register 2 equal 00000003. (For floor id 3.)
         leti R3, 0000000A //Makes register 3 equal 0000000A. (For room id 10.)
         if_zone_clear R1, R2 //If room id 10 on floor id 3 has been cleared of enemies make register 1 equal 00000001.
         jmpi_= R1, 00000000, 101 //If register 1 equals 00000000 jump to function 101.
         sync_register R1, 00000001 //Makes register 1 equal 00000001 for all clients.
         jmp 101 //Jumps to function 101.

Also see

ret, thread, sync, jmpi_=,

leti, sync_register, jmp