๐Ÿ—ƒ๏ธNACT

CharacterCleanup

undefined

function NACT.CharacterCleanup(character: any)

Parameters

Name
Type
Description

character

any

Constructor

undefined

(method) NACT:Constructor()

Parameters

DebugDisplayCoverPoints

INTERNAL. Used by the editor mode. This will create a trigger for each cover point. Usage in production not good.

function NACT.DebugDisplayCoverPoints()

Parameters

GetCharacterFromCauserEntity

Get the character from the causer in some events of nanos

Returns

Character the real causer

Parameters

Name
Type
Description

causer

Character

Weapon

GetMapCoverPoints

Returns all the defined cover points of the territory

Returns

table TO BE DOCUMENTED

Parameters

GetTime

Get time in seconds

Returns

number The time in seconds

Parameters

GetTriggerPopulation

Gets the trigger population of the trigger in parameter

Returns

table array of characters that populates the trigger

Parameters

Name
Type
Description

tTrigger

table

TriggerTable to scan

sPopulationType

"allies"

"enemies"

RegisterNpc

This functions handles registering a new NPC into the system. It will wrap a Character with a NACT_NPC.

NACT provies a few default configurations #LINK MISSING# for you to use, but it's funnier to tweak stuff!

It can take the following table as a configuration:

You can pass any additional value you want if you need them for your behaviors in the config part.

Returns

NACT_NPC|nil NACT_NPC created or nil if operation failed

Parameters

Name
Type
Description

cNpcToHandle

Character

Npc to be controlled NACT

sTerritoryName

string

The Territory this NPC will use to find it's cover and patrol points

tNpcConfig

table

See above for tNpcConfig map

RegisterTerritory

Add a territory to NACT.

It can take the following table as a configuration:

You can pass any additional value you want if you need them for your behaviors.

Returns

NACT_Territory The created territory

Parameters

Name
Type
Description

sTerritoryName

string

Name of the territory

tZoneConfigTable

table

Documented above

SetMapCoverPoints

Set the map cover points that will be used when creating a territory

Parameters

Name
Type
Description

tMapCoverPoints

table

TO BE DOCUMENTED test doc update

ValueOrDefault

Utility function especially useful for configurations. Returns a value if defined or the default

Returns

any or defaultValue

Parameters

Name
Type
Description

maybeValue

any

The value to be used if not nil

default

any

The default value if maybeValue is nil

createTriggerBox

Creates a trigger box for NACT while keeping track of all the allies and enemies that enter or leave the trigger box

Returns

table resulting table

Parameters

Name
Type
Description

vTriggerLocation

Vector

Location to spawn the trigger

linkedTerritoryOrNpc

NACT_NPC

NACT_Territory

eTriggerType

TriggerType

The trigger type to create

nRadius

number

Radius of the trigger

eDebugColor

Color

the debug color when debugging triggers

bServerTrigger

Boolean

either this trigger is serverside or clientside (CSSTT)

checkEvery

Number

Every ticks to check. 1 will check every tick, 20 will check every 20 ticks

Last updated