Jump to: navigation, search


Get Targets In Cylindrical Annulus

GetTargetsInCylindricalAnnulus(playerSensitive as Boolean, npcSensitive as Boolean, cylBase as Vector3, cylOuterRadius as Float, cylInnerRadius as Float, cylDirection as Vector3, cylDistance 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 center of the base of the cylinder
the outer radius of the cylinder, in worldspace units
the inner radius of the cylinder, in worldspace units
a vector describing the direction the cylinder "goes" (see VectorDirections)
the height of the cylinder, 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 cylinder annulus defined below
pc as boolean = TRUE
npc as boolean = FALSE
targets as list of noderef
cylBase as vector3 = (0, 0, 0)
cylOuterRadius as float = 30.0
cylInnerRadius as float = 10.0
cylDirection as vector3 = (3, 0, 0)
cylDistance as float = 10.0
targets = GetTargetsInCylinder(pc, npc, cylBase, cylOuterRadius, cylInnerRadius, cylDirection, cylDistance)
foreach target in targets
  println(" is in the cone")
Personal tools