← Previous | Next →
distanceCoordsClose
Description
Checks if the NPC is within a specified distance from a given set of coordinates.
| Name |
Type |
Possibilities |
| distanceCoordsClose |
both |
2 |
Parameters
| # |
Name |
Type |
Mandatory |
Description |
Multiple |
| 1 |
distance |
number |
Yes |
The maximum distance within which the NPC should be to return a positive result. |
No |
| 2 |
x |
number |
Yes |
The X coordinate to check against. |
No |
| 3 |
y |
number |
Yes |
The Y coordinate to check against. |
No |
| 4 |
z |
number |
Yes |
The Z coordinate to check against. |
No |
Outputs
| # |
Description |
| 1 |
The NPC is within the specified distance. |
| 2 |
The NPC is not within the specified distance. |
Example
NPC
name Guard
model s_m_m_security_01
position -1020.72 4839.78 258.30 0.0
interaction
distanceCoordsClose 5.0 100.0 200.0 300.0
tell "The NPC is close to the specified location."
tell "The NPC is not close to the specified location."
behaviour
nothing