Difference between revisions of "Set obj param"

From Unofficial QEdit Wiki Guide
Jump to: navigation, search
 
 
Line 31: Line 31:
 
  <span style='color:green'>        leti </span>R5, 00000065 <span style='color:orange'>//Makes register 5 equal 00000065.</span>
 
  <span style='color:green'>        leti </span>R5, 00000065 <span style='color:orange'>//Makes register 5 equal 00000065.</span>
 
  <span style='color:green'>        leti </span>R6, 0000000A <span style='color:orange'>//Makes register 6 equal 0000000A.</span>
 
  <span style='color:green'>        leti </span>R6, 0000000A <span style='color:orange'>//Makes register 6 equal 0000000A.</span>
  <span style='color:green'>        set_obj_param </span>R1, R7 <span style='color:orange'>//Makes a target able object at x158, y0 ,z228 with a radius of 30 which will call function 101 when spoken to target cursor will appear 10 above ground.</span>
+
  <span style='color:green'>        set_obj_param </span>R1, R7 <span style='color:orange'>//Makes a target able object at x158, y0, z228, with a radius of 30, which will call function 101 when spoken to, the target cursor will appear 10 above ground.</span>
 
  <span style='color:green'>        ret </span>
 
  <span style='color:green'>        ret </span>
 
  <span style='color:blue'>101:    </span><span style='color:green'>window_msg </span>You have created<cr>a set_obj_param. <span style='color:orange'>//Display a window message.</span>
 
  <span style='color:blue'>101:    </span><span style='color:green'>window_msg </span>You have created<cr>a set_obj_param. <span style='color:orange'>//Display a window message.</span>

Latest revision as of 08:05, 5 May 2013

Syntax

Syntax: set_obj_param register1, register2

  • register1 = Start of continuous registers for leti arguments.

6 registers.

1st register = X position of the target cursor.

2nd register = Y position of the target cursor.

3rd register = Z position of the target cursor.

4th register = Radius, how close you have to be in order for the target to appear.

5th register = Function to call when spoken to.

6th register = How far off the ground the target cursor is.

  • register2 = Register to store the target cursor information in. This register is to be used to remove the target cursor with del_obj_param.

Use

Used to make a target able object that will call a function when spoken to.

Example


100:     leti R1, 0000009E //Makes register 1 equal 0000009E.
         leti R2, 00000000 //Makes register 2 equal 00000000.
         leti R3, 000000E4 //Makes register 3 equal 000000E4.
         leti R4, 0000001E //Makes register 4 equal 0000001E.
         leti R5, 00000065 //Makes register 5 equal 00000065.
         leti R6, 0000000A //Makes register 6 equal 0000000A.
         set_obj_param R1, R7 //Makes a target able object at x158, y0, z228, with a radius of 30, which will call function 101 when spoken to, the target cursor will appear 10 above ground.
         ret 
101:     window_msg You have created<cr>a set_obj_param. //Display a window message.
         winend  //Closes the window message.
         ret 

Also see

leti, ret, window_msg,

winend, del_obj_param