Jump to: navigation, search

GetTargetsInCone(playerSensitive as Boolean, npcSensitive as Boolean, coneBase as Vector3, coneAngularWidth as Float, coneDirection as Vector3, coneDistance as Float) as List of NodeRef


Indicates whether players are included in the list of returned nodes
Indicates whether non-playing characters are included in the list of returned nodes.
The 'point' of the cone (shaped like an ice-cream cone)
The angle at which the cone "opens out" away from the base. Valid between 0 and 180, exclusive.
A vector describing the direction the cone "goes" (see VectorDirections)
The height of the cone, if the direction were "up"


This function can be called in a script to learn what player nodes are around a given area.

The functions return a list of type noderef, which will include all visible player or character nodes within the defined area.

Other types of assets (waypoints, landscape, etc.) are not targeted in the search.

NPC's can be returned if npcSensitive is set to true.

For more information see: Area Awareness


// The following would print a list of all pc's (and no npc's) within a cone defined below
pc as boolean = TRUE
npc as boolean = FALSE
targets as list of noderef
coneBase as vector3 = (0, 0, 0)
coneAngularWidth as float = 30.0
coneDirection as vector3 = (3, 0, 0)
coneDistance as float = 10.0
targets = GetTargetsInCone(pc, npc, coneBase, coneAngularWidth, coneDirection, coneDistance)
foreach target in targets
  println(" is in the cone")
Personal tools