🏭Territory
AddNPC
INTERNAL. Adds an NPC handled by the territory
(method) NACT_Territory:AddNPC(nactNpc: NACT_NPC)
Parameters
nactNpc
NACT_NPC
AddPatrolRoute
Adds a patrol route instead of using the config table
(method) NACT_Territory:AddPatrolRoute(sPatrolRouteName: string, tPatrol: table)
Parameters
sPatrolRouteName
string
The patrol route name to use
tPatrol
table
CleanupCharacter
Cleanns up a character from the territory and it's npcs. Switches authority if charcter belonged to player that was authority
(method) NACT_Territory:CleanupCharacter(character: any)
Parameters
character
any
Constructor
Territory is a zone controlled by NPCs.
It takes a parameter the following table:
{
team = 1, -- The team of the territory
patrolRoutes = {} -- Optional, the patrol routes of this territory. You can also call AddPatrolRoute
}
cover points and patrol routes
(method) NACT_Territory:Constructor(tTerritoryConfig: TerritoryConfig, sTerritoryName: string)
Parameters
tTerritoryConfig
TerritoryConfig
territory config map
sTerritoryName
string
name of the territory
FindByName
Finds a territory by name
function NACT_Territory.FindByName(sTerritoryName: string)
-> NACT_Territory|nil
Returns
NACT_Territory|nil
Territory if it was found
Parameters
sTerritoryName
string
Name of the territory
GetAlliesInZone
Gets all the enemies thare are in the territory
(method) NACT_Territory:GetAlliesInZone()
-> table
Returns
table
Sequential array of allies in the territory
Parameters
GetEnemiesInZone
Gets all the enemies thare are in the territory
(method) NACT_Territory:GetEnemiesInZone()
-> table
Returns
table
Sequential array of enemies in the territory
Parameters
GetNetworkAuthority
Gets the network authority of the territory or nil if not defined or valid
(method) NACT_Territory:GetNetworkAuthority()
-> Player|nil
Returns
Player|nil
Current authority if defined and valid
Parameters
RefreshCoverPoints
This function will refresh the cover points of the territory by getting the map cover points thart are in the zone bounds. For now this only supports sphere
(method) NACT_Territory:RefreshCoverPoints()
Parameters
RemoveNPC
INTERNAL. Removes an NPC from the territory
(method) NACT_Territory:RemoveNPC(nactNpc: NACT_NPC)
Parameters
nactNpc
NACT_NPC
SwitchNetworkAuthority
INTERNAL. Switches the network authority of the player that will handle all client ops of the territory
(method) NACT_Territory:SwitchNetworkAuthority()
Parameters
UpdateCSSTAuthority
INTERNAL. Switches authority for all clientside Triggers
(method) NACT_Territory:UpdateCSSTAuthority()
Parameters
UpdateCoverViability
Updates the viability of cover points
(method) NACT_Territory:UpdateCoverViability(tViabilityResult: array)
Parameters
tViabilityResult
array
[coverIndex]:
Last updated