GSC reference › Built-in
GetNodeArraySorted()
Built-in (engine)
Server
Gets an array of nodes that have the given name, key pair, within given radius, sorts them
Signature
GetNodeArraySorted(<name>, <key>, <pos>, <r>)
Parameters
| Name | Required? | Details |
|---|---|---|
| name | Required | name to search for |
| key | Required | key that name goes with |
| pos | Required | search origin |
| r | Required | the radius to sort in |
Returns
pathnode
Example (from Treyarch's docs)
nodes = GetNodeArraySorted(self.target, "targetname", self.origin, 256 )
Real uses in BO3's scripts
Called 2 times in the decompiled scripts. A few, zombies first:
- scripts/cp/cp_mi_sing_vengeance_dogleg_1.gsc, line 1184
node = getnodearraysorted("dogleg_1_retreat_nodes", "targetname", guy.origin, 4096); - scripts/cp/cp_mi_sing_vengeance_temple.gsc, line 673
node = getnodearraysorted("temple_retreat_nodes", "targetname", guy.origin, 4096);
Related built-ins
- GetNodeArray()Gets an array of nodes that have the given name, key pair
- GetVehicleNodeArray()Gets an array of vehicle nodes that have the given name, key pair
- GetNodesInRadiusSorted()Gets all of the nodes (max of 256) within a cylinder, sorted by closest to <origin>
- GetAnyNodeArray()Gets an array of nodes within given radius
- GetCoverNodeArray()Gets an array of cover nodes within given radius
- array()Create an array
- GetEntArray()Looks up entities by key and name and a return an array of the matched entities
- IsArray()Checks whether this entity/variable is an array
- ArrayRemoveValue()Remove a value from an array (may affect multiple indexes)
- GetAITeamArray()Returns an array of the human AI and vehicle AI
- GetArrayKeys()Returns an array consisting of the keys of the input array.
- ArrayCombine()Combine two arrays into and returns one new array
New to GSC?
Start with the basics, or paste a compile error to get the fix.
Built-in descriptions, parameters and examples come from Treyarch's BO3 mod tools docs. Usage links point at shiversoftdev/t7-source (decompiled BO3 scripts).