Difference between revisions of "Set slot invincible"

From Unofficial QEdit Wiki Guide
Jump to: navigation, search
Line 17: Line 17:
 
  <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:green'>       jmpi_= </span>R70, 00000000, 1 <span style='color:orange'>//If register 70 equal 00000000 jump to function 1.</span>
+
  <span style='color:green'>         jmpi_= </span>R70, 00000000, 1 <span style='color:orange'>//If register 70 equal 00000000 jump to function 1.</span>
 
  <span style='color:red'>        set_slot_invincible </span>R250, R70 <span style='color:orange'>//If register 70 equals 00000001 make all players invincible.</span>
 
  <span style='color:red'>        set_slot_invincible </span>R250, R70 <span style='color:orange'>//If register 70 equals 00000001 make all players invincible.</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>

Revision as of 09:18, 28 April 2013

Syntax

Syntax: set_slot_invincible register 1, register 2

  • register 1 = Reserved register 250 for players slot number.
  • register 2 = Register to act as on off switch for player invincibility.

Use

Makes players invincible.

Example


1:       ret 
100:     get_slotnumber R250 //gets the players slot number and stores it in register 250.
         leti R70, 00000001 //Makes register 70 equal 00000001 (on switch for players invincible).
         thread 101 //Threads function 101.
         ret 
101:     sync  //Waits 1 frame.
         jmpi_= R70, 00000000, 1 //If register 70 equal 00000000 jump to function 1.
         set_slot_invincible R250, R70 //If register 70 equals 00000001 make all players invincible.
         jmp 101 //Jumps to function 101.
102:     leti R70, 0000000 //Makes register 70 equal 00000000 (off switch for players invincible).
         ret 

Also see

ret, get_slotnumber, leti,

thread, sync, jmpi_=, jmp,