Difference between revisions of "Run to coord"

From Unofficial QEdit Wiki Guide
Jump to: navigation, search
(Created page with "==Syntax== ''Syntax:'' <span style='font-size:12px;font-family:courier'><span style='color:green'>run_to_coord</span> register1</span> * ''register1 = Player destination loca...")
 
(Syntax)
 
(3 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
* ''register2 = Player destination location y co cords.''
 
* ''register2 = Player destination location y co cords.''
 
* ''register3 = Player destination location z co cords.''
 
* ''register3 = Player destination location z co cords.''
 +
* ''register4 = Player Slot.''
 +
* ''register5 = Player Slot. (Not needed on BB)''
  
 
==Use==
 
==Use==
Line 13: Line 15:
  
 
  <span style='font-size:12px;font-family:courier'>
 
  <span style='font-size:12px;font-family:courier'>
<span style='color:blue'>0:    </span><span style='color:green'>get_slotnumber </span>R250 <span style='color:orange'>//Puts the player's slot number into Register 250</span>
 
 
  <span style='color:blue'>100:    </span><span style='color:green'>leti </span>R1, 00000115 <span style='color:orange'>//X coordinate of the destination of where you want the player to run.</span>
 
  <span style='color:blue'>100:    </span><span style='color:green'>leti </span>R1, 00000115 <span style='color:orange'>//X coordinate of the destination of where you want the player to run.</span>
 
  <span style='color:green'>        leti </span>R2, 00000020 <span style='color:orange'>//Y coordinate of the destination of where you want the player to run.</span>
 
  <span style='color:green'>        leti </span>R2, 00000020 <span style='color:orange'>//Y coordinate of the destination of where you want the player to run.</span>
 
  <span style='color:green'>        leti </span>R3, 0000004B <span style='color:orange'>//Z coordinate of the destination of where you want the player to run.</span>
 
  <span style='color:green'>        leti </span>R3, 0000004B <span style='color:orange'>//Z coordinate of the destination of where you want the player to run.</span>
  <span style='color:green'>        run_to_coord R1 </span><span style='color:orange'>//Tells where to start the continuation of registry strings to be used for the player movement.</span>
+
<span style='color:green'>        leti </span>R4, 0000000 <span style='color:orange'>//Player slot used.</span>
 +
<span style='color:green'>        leti </span>R5, 0000000 <span style='color:orange'>//Player slot used. (Not needed on BB)</span>
 +
  <span style='color:green'>        run_to_coord R1, R5 </span><span style='color:orange'>//Tells where to start the continuation of registry strings to be used for the player movement.</span>
 
  <span style='color:green'>        ret </span>
 
  <span style='color:green'>        ret </span>
  
 
==Also see==
 
==Also see==
[[leti]], [[ret]], [[get_slotnumber]], [[Reserved Registers]]
+
[[leti]], [[ret]], [[get_slotnumber]], [[reservedregisters]]

Latest revision as of 23:56, 31 May 2022

Syntax

Syntax: run_to_coord register1

  • register1 = Player destination location x co cords.
  • register2 = Player destination location y co cords.
  • register3 = Player destination location z co cords.
  • register4 = Player Slot.
  • register5 = Player Slot. (Not needed on BB)

Use

Used to make a player run to a specific destination.

Example

//This opcode is used to move the player to a specific place on the map.


100:     leti R1, 00000115 //X coordinate of the destination of where you want the player to run.
         leti R2, 00000020 //Y coordinate of the destination of where you want the player to run.
         leti R3, 0000004B //Z coordinate of the destination of where you want the player to run.
         leti R4, 0000000 //Player slot used.
         leti R5, 0000000 //Player slot used. (Not needed on BB)
         run_to_coord R1, R5 //Tells where to start the continuation of registry strings to be used for the player movement.
         ret 

Also see

leti, ret, get_slotnumber, reservedregisters