Skip to content

← Previous | Next →


setCoords

Description

Sets the NPC's position to the specified coordinates.

Basic information

Name Type Possibilities
setCoords behaviour 2

Parameters

# Name Type Mandatory Description Multiple
1 x number Yes The X coordinate to set the NPC's position to. No
2 y number Yes The Y coordinate to set the NPC's position to. No
3 z number Yes The Z coordinate to set the NPC's position to. No
4 distance number No The maximum distance within which the NPC's position should not be set. If the NPC is within this distance from the specified coordinates, the action will not move the NPC. Optional parameter. No

Outputs

# Description
1 The NPC is already within the specified distance from the coordinates.
2 The NPC's position was set to the specified coordinates.

Example


  NPC 

  name Teleporter 
  model s_m_m_security_01 
  position -1020.72 4839.78 258.30 0.0 

  interaction 
    nothing 

  behaviour 
    setCoords 150.0 200.0 300.0