Difference between revisions of "Get coord player detect"
From Unofficial QEdit Wiki Guide
(→Syntax) |
(→Syntax) |
||
Line 1: | Line 1: | ||
==Syntax== | ==Syntax== | ||
− | ''Syntax:'' <span style='font-size:12px;font-family:courier'><span style='color:green'> | + | ''Syntax:'' <span style='font-size:12px;font-family:courier'><span style='color:green'>get_coord_player_detect</span> register1, register4</span> |
* ''register1 = X value.'' | * ''register1 = X value.'' |
Revision as of 21:48, 10 June 2022
Contents
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
0: get_slotnumber R250 //Gets the player's slot # and puts it in R250. ret 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. let R4, R250 //Set the player slot to R250. get_coord_player_detect R1, R5 //Tells where to start the continuation of registry strings to be used for the coordinates. jmpi_= R5, 00000000, 101 //If R5 is set to 0, player is not in radius (call function 101). jmpi_= R5, 00000001, 102 //If R5 is set to 1, player is in radius (call function 102). ret 101: window_msg 'You are not in the radius.' winend ret 102: window_msg 'You are in the radius!' winend ret