Get coord player detect

From Unofficial QEdit Wiki Guide
Jump to: navigation, search

Syntax

Syntax: get_coord_player_detect register1, register4

  • register1 = X value.
  • register2 = Z value.
  • register3 = Radius.
  • register4 = Output for slot 0.
  • register5 = Output for slot 1.
  • register6 = Output for slot 2.
  • register7 = Output for slot 3.

Use

Script version of a touch plate object; used to detect a player's location within specific set parameters.

Example

100: leti R1, 0000000A              //Set the X value to 10.
     leti R2, 00000014              //Set Z value to 20.
     leti R3, 00000064              //Set the radius to 100.
     get_coord_player_detect R1, R4 //Tells where to start the continuation of registry strings to be used for the coordinates.
     jmpi_= R4, 00000000, 101
     window_msg 'Slot 0 is in the radius!'
     winend 
101: jmpi_= R5, 00000000, 102
     window_msg 'Slot 1 is in the radius!'
     winend 
102: jmpi_= R6, 00000000, 103
     window_msg 'Slot 2 is in the radius!'
     winend 
103: jmpi_= R7, 00000000, 104
     window_msg 'Slot 3 is in the radius!'
     winend 
104: ret 

Also see

leti let jmpiue get_slotnumber ret