Difference between revisions of "At coords talk"

From Unofficial QEdit Wiki Guide
Jump to: navigation, search
Line 28: Line 28:
 
  <span style='color:blue'>100:    </span><span style='color:green'>call </span>101 <span style='color:orange'>//Calls function 101.</span>
 
  <span style='color:blue'>100:    </span><span style='color:green'>call </span>101 <span style='color:orange'>//Calls function 101.</span>
 
  <span style='color:green'>        ret </span>
 
  <span style='color:green'>        ret </span>
  <span style='color:blue'>100:    </span><span style='color:green'>leti </span>R1, 0000002D <span style='color:orange'>//Makes register 1 equal 0000002D.</span>
+
  <span style='color:blue'>101:    </span><span style='color:green'>leti </span>R1, 0000002D <span style='color:orange'>//Makes register 1 equal 0000002D.</span>
 
  <span style='color:green'>        leti </span>R2, 00000000 <span style='color:orange'>//Makes register 2 equal 00000000.</span>
 
  <span style='color:green'>        leti </span>R2, 00000000 <span style='color:orange'>//Makes register 2 equal 00000000.</span>
 
  <span style='color:green'>        leti </span>R3, FFFFFF56 <span style='color:orange'>//Makes register 3 equal FFFFFF56.</span>
 
  <span style='color:green'>        leti </span>R3, FFFFFF56 <span style='color:orange'>//Makes register 3 equal FFFFFF56.</span>
 
  <span style='color:green'>        leti </span>R4, 0000001E <span style='color:orange'>//Makes register 4 equal 0000001E.</span>
 
  <span style='color:green'>        leti </span>R4, 0000001E <span style='color:orange'>//Makes register 4 equal 0000001E.</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>R5, 00000066 <span style='color:orange'>//Makes register 5 equal 00000066.</span>
  <span style='color:green'>        at_coords_talk </span>R1 <span style='color:orange'>//Creates a script collision at register 1 (x position), register 2 (y position), register 3(z position), with a collision radius of register 4 (30), and calls function in register 5 (function 101). Changes the center action pallet to a talk icon when standing in the collision radius. The center action pallet talk icon needs to be pressed to call the function specified in register 5.</span>
+
  <span style='color:green'>        at_coords_talk </span>R1 <span style='color:orange'>//Creates a script collision at register 1 (x position), register 2 (y position), register 3(z position), with a collision radius of register 4 (30), and calls function in register 5 (function 102). Changes the center action pallet to a talk icon when standing in the collision radius. The center action pallet talk icon needs to be pressed to call the function specified in register 5.</span>
 
  <span style='color:green'>        ret </span>
 
  <span style='color:green'>        ret </span>
  <span style='color:blue'>101:    </span><span style='color:green'>jmpi_= </span>R6, 00000001, 1 <span style='color:orange'>//IF register 6 equals 00000001 jump to function 1.</span>
+
  <span style='color:blue'>102:    </span><span style='color:green'>jmpi_= </span>R6, 00000001, 1 <span style='color:orange'>//IF register 6 equals 00000001 jump to function 1.</span>
 
  <span style='color:green'>        leti </span>R6, 00000001 <span style='color:orange'>//Makes register 6 equal 00000001.</span>
 
  <span style='color:green'>        leti </span>R6, 00000001 <span style='color:orange'>//Makes register 6 equal 00000001.</span>
 
  <span style='color:green'>        window_msg </span>You just stepped in a<cr>script collision made<cr>through scripting. <span style='color:orange'>//Displays a window message.</span>
 
  <span style='color:green'>        window_msg </span>You just stepped in a<cr>script collision made<cr>through scripting. <span style='color:orange'>//Displays a window message.</span>

Revision as of 11:02, 3 May 2013

Syntax

Syntax: at_coords_talk register1

  • register1 = start of continuous registers.

5 registers

1st register = Position x. (In dec.)

2nd register = Position y. (In dec.)

3rd register = Position z. (In dec.)

4th register = Collision radius. (In dec.)

5ht register = Function to call. (In dec.)

Use

Used to create a script collision through scripting.

When standing in the collision radius the center action pallet will be changed to a chat icon.

The center action pallet needs to be pressed to call the function specified in the 5th register of register1.

Example


1:       ret 
100:     call 101 //Calls function 101.
         ret 
101:     leti R1, 0000002D //Makes register 1 equal 0000002D.
         leti R2, 00000000 //Makes register 2 equal 00000000.
         leti R3, FFFFFF56 //Makes register 3 equal FFFFFF56.
         leti R4, 0000001E //Makes register 4 equal 0000001E.
         leti R5, 00000066 //Makes register 5 equal 00000066.
         at_coords_talk R1 //Creates a script collision at register 1 (x position), register 2 (y position), register 3(z position), with a collision radius of register 4 (30), and calls function in register 5 (function 102). Changes the center action pallet to a talk icon when standing in the collision radius. The center action pallet talk icon needs to be pressed to call the function specified in register 5.
         ret 
102:     jmpi_= R6, 00000001, 1 //IF register 6 equals 00000001 jump to function 1.
         leti R6, 00000001 //Makes register 6 equal 00000001.
         window_msg You just stepped in a<cr>script collision made<cr>through scripting. //Displays a window message.
         winend  //Closes the window message.
         ret 

Also see

ret, call, leti,

jmpi_=, window_msg, winend