NWNX:EE  8193.36.12
Encounter

Readme

Functions exposing additional encounter properties

Files

file  nwnx_encounter.nss
 

Classes

struct  NWNX_Encounter_CreatureListEntry
 A creature list entry for an encounter. More...
 

Functions

void NWNX_Encounter_Destroy (object encounter)
 Immediately destroys the specified encounter object. More...
 
int NWNX_Encounter_GetNumberOfCreaturesInEncounterList (object encounter)
 Get the number of creatures in the encounter list. More...
 
struct NWNX_Encounter_CreatureListEntry NWNX_Encounter_GetEncounterCreatureByIndex (object encounter, int index)
 Gets the encounter creature list entry at the specified index. More...
 
void NWNX_Encounter_SetEncounterCreatureByIndex (object encounter, int index, struct NWNX_Encounter_CreatureListEntry creatureEntry)
 Set the encounter creature list entry at the specified index. More...
 
int NWNX_Encounter_GetFactionId (object encounter)
 Get the faction id of encounter. More...
 
void NWNX_Encounter_SetFactionId (object encounter, int factionId)
 Set the faction id of encounter. More...
 
int NWNX_Encounter_GetPlayerTriggeredOnly (object encounter)
 Get if encounter is player triggered only. More...
 
void NWNX_Encounter_SetPlayerTriggeredOnly (object encounter, int playerTriggeredOnly)
 Set if encounter is player triggered only. More...
 
int NWNX_Encounter_GetCanReset (object encounter)
 Get if the encounter respawns or not. More...
 
void NWNX_Encounter_SetCanReset (object encounter, int reset)
 Set if the encounter respawns or not. More...
 
int NWNX_Encounter_GetResetTime (object encounter)
 Get the reset time of encounter. More...
 
void NWNX_Encounter_SetResetTime (object encounter, int resetTime)
 Set the reset time of encounter. More...
 
int NWNX_Encounter_GetNumberOfSpawnPoints (object encounter)
 Get the number of spawn points of encounter. More...
 
location NWNX_Encounter_GetSpawnPointByIndex (object encounter, int index)
 Gets the spawn point list entry at the specified index. More...
 
int NWNX_Encounter_GetMinNumSpawned (object encounter)
 Get the minimum amount of creatures that encounter will spawn. More...
 
int NWNX_Encounter_GetMaxNumSpawned (object encounter)
 Get the maximum amount of creatures that encounter will spawn. More...
 
int NWNX_Encounter_GetCurrentNumSpawned (object encounter)
 Get the current number of creatures that are spawned and alive. More...
 
string NWNX_Encounter_GetGeometry (object oEncounter)
 Get the geometry of an encounter. More...
 
void NWNX_Encounter_SetGeometry (object oTrigger, string sGeometry)
 Set the geometry of an encounter with a list of vertex positions. More...
 

Function Documentation

◆ NWNX_Encounter_Destroy()

void NWNX_Encounter_Destroy ( object  encounter)

Immediately destroys the specified encounter object.

Parameters
encounterThe encounter object.

Definition at line 123 of file nwnx_encounter.nss.

◆ NWNX_Encounter_GetNumberOfCreaturesInEncounterList()

int NWNX_Encounter_GetNumberOfCreaturesInEncounterList ( object  encounter)

Get the number of creatures in the encounter list.

Parameters
encounterThe encounter object.
Returns
The number of creatures in the encounter list.

Definition at line 131 of file nwnx_encounter.nss.

◆ NWNX_Encounter_GetEncounterCreatureByIndex()

struct NWNX_Encounter_CreatureListEntry NWNX_Encounter_GetEncounterCreatureByIndex ( object  encounter,
int  index 
)

Gets the encounter creature list entry at the specified index.

Parameters
encounterThe encounter object.
indexThe index of the creature in the encounter list.
Returns
An NWNX_Encounter_CreatureListEntry.

Definition at line 141 of file nwnx_encounter.nss.

◆ NWNX_Encounter_SetEncounterCreatureByIndex()

void NWNX_Encounter_SetEncounterCreatureByIndex ( object  encounter,
int  index,
struct NWNX_Encounter_CreatureListEntry  creatureEntry 
)

Set the encounter creature list entry at the specified index.

Parameters
encounterThe encounter object.
indexThe index of the creature in the encounter list.
creatureEntryThe NWNX_Encounter_CreatureListEntry.

Definition at line 159 of file nwnx_encounter.nss.

◆ NWNX_Encounter_GetFactionId()

int NWNX_Encounter_GetFactionId ( object  encounter)

Get the faction id of encounter.

Parameters
encounterThe encounter object.
Returns
The faction id.

Definition at line 173 of file nwnx_encounter.nss.

◆ NWNX_Encounter_SetFactionId()

void NWNX_Encounter_SetFactionId ( object  encounter,
int  factionId 
)

Set the faction id of encounter.

Parameters
encounterThe encounter object.
factionIdThe faction id.

Definition at line 183 of file nwnx_encounter.nss.

◆ NWNX_Encounter_GetPlayerTriggeredOnly()

int NWNX_Encounter_GetPlayerTriggeredOnly ( object  encounter)

Get if encounter is player triggered only.

Parameters
encounterThe encounter object.
Returns
TRUE if encounter is player triggered only.

Definition at line 193 of file nwnx_encounter.nss.

◆ NWNX_Encounter_SetPlayerTriggeredOnly()

void NWNX_Encounter_SetPlayerTriggeredOnly ( object  encounter,
int  playerTriggeredOnly 
)

Set if encounter is player triggered only.

Parameters
encounterThe encounter object.
playerTriggeredOnlyTRUE/FALSE

Definition at line 203 of file nwnx_encounter.nss.

◆ NWNX_Encounter_GetCanReset()

int NWNX_Encounter_GetCanReset ( object  encounter)

Get if the encounter respawns or not.

Parameters
encounterThe encounter object.
Returns
TRUE if the encounter does respawn, FALSE otherwise.

Definition at line 213 of file nwnx_encounter.nss.

◆ NWNX_Encounter_SetCanReset()

void NWNX_Encounter_SetCanReset ( object  encounter,
int  reset 
)

Set if the encounter respawns or not.

Parameters
encounterThe encounter object.
resetDoes the encounter respawn TRUE or FALSE.

Definition at line 223 of file nwnx_encounter.nss.

◆ NWNX_Encounter_GetResetTime()

int NWNX_Encounter_GetResetTime ( object  encounter)

Get the reset time of encounter.

Parameters
encounterThe encounter object.
Returns
The seconds the encounter is defined to reset.

Definition at line 233 of file nwnx_encounter.nss.

◆ NWNX_Encounter_SetResetTime()

void NWNX_Encounter_SetResetTime ( object  encounter,
int  resetTime 
)

Set the reset time of encounter.

Parameters
encounterThe encounter object.
resetTimeThe seconds the encounter will reset.

Definition at line 243 of file nwnx_encounter.nss.

◆ NWNX_Encounter_GetNumberOfSpawnPoints()

int NWNX_Encounter_GetNumberOfSpawnPoints ( object  encounter)

Get the number of spawn points of encounter.

Parameters
encounterThe encounter object.
Returns
The count of the spawn points for the encounter.

Definition at line 253 of file nwnx_encounter.nss.

◆ NWNX_Encounter_GetSpawnPointByIndex()

location NWNX_Encounter_GetSpawnPointByIndex ( object  encounter,
int  index 
)

Gets the spawn point list entry at the specified index.

Parameters
encounterThe encounter object.
indexThe index of the spawn point in the encounter list.
Returns
Location of spawn point.

Definition at line 263 of file nwnx_encounter.nss.

◆ NWNX_Encounter_GetMinNumSpawned()

int NWNX_Encounter_GetMinNumSpawned ( object  encounter)

Get the minimum amount of creatures that encounter will spawn.

Parameters
encounterThe encounter object.
Returns
the minimal amount.

Definition at line 279 of file nwnx_encounter.nss.

◆ NWNX_Encounter_GetMaxNumSpawned()

int NWNX_Encounter_GetMaxNumSpawned ( object  encounter)

Get the maximum amount of creatures that encounter will spawn.

Parameters
encounterThe encounter object.
Returns
the maximal amount.

Definition at line 289 of file nwnx_encounter.nss.

◆ NWNX_Encounter_GetCurrentNumSpawned()

int NWNX_Encounter_GetCurrentNumSpawned ( object  encounter)

Get the current number of creatures that are spawned and alive.

Parameters
encounterThe encounter object.
Returns
amount of creatures

Definition at line 299 of file nwnx_encounter.nss.

◆ NWNX_Encounter_GetGeometry()

string NWNX_Encounter_GetGeometry ( object  oEncounter)

Get the geometry of an encounter.

Parameters
oEncounterThe encounter object.
Returns
A string of vertex positions.

Definition at line 309 of file nwnx_encounter.nss.

◆ NWNX_Encounter_SetGeometry()

void NWNX_Encounter_SetGeometry ( object  oTrigger,
string  sGeometry 
)

Set the geometry of an encounter with a list of vertex positions.

Parameters
oTriggerThe encounter object.
sGeometryNeeds to be in the following format -> {x.x, y.y, z.z} or {x.x, y.y} Example Geometry: "{1.0, 1.0, 0.0}{4.0, 1.0, 0.0}{4.0, 4.0, 0.0}{1.0, 4.0, 0.0}"
Remarks
The Z position is optional and will be calculated dynamically based on terrain height if it's not provided.
The minimum number of vertices is 3.

Definition at line 319 of file nwnx_encounter.nss.