6 const string NWNX_Encounter =
"NWNX_Encounter";
124 NWNXPushObject(encounter);
125 NWNXCall(NWNX_Encounter,
"Destroy");
130 NWNXPushObject(encounter);
131 NWNXCall(NWNX_Encounter,
"GetNumberOfCreaturesInEncounterList");
139 NWNXPushObject(encounter);
140 NWNXCall(NWNX_Encounter,
"GetEncounterCreatureByIndex");
141 creatureEntry.alreadyUsed = NWNXPopInt();
142 creatureEntry.unique = NWNXPopInt();
143 creatureEntry.challengeRating = NWNXPopFloat();
144 creatureEntry.resref = NWNXPopString();
145 return creatureEntry;
151 NWNXPushInt(creatureEntry.
unique);
153 NWNXPushString(creatureEntry.
resref);
155 NWNXPushObject(encounter);
156 NWNXCall(NWNX_Encounter,
"SetEncounterCreatureByIndex");
161 NWNXPushObject(encounter);
162 NWNXCall(NWNX_Encounter,
"GetFactionId");
168 NWNXPushInt(factionId);
169 NWNXPushObject(encounter);
170 NWNXCall(NWNX_Encounter,
"SetFactionId");
175 NWNXPushObject(encounter);
176 NWNXCall(NWNX_Encounter,
"GetPlayerTriggeredOnly");
183 NWNXPushInt(playerTriggeredOnly);
184 NWNXPushObject(encounter);
185 NWNXCall(NWNX_Encounter,
"SetPlayerTriggeredOnly");
190 NWNXPushObject(encounter);
191 NWNXCall(NWNX_Encounter,
"GetCanReset");
198 NWNXPushObject(encounter);
199 NWNXCall(NWNX_Encounter,
"SetCanReset");
204 NWNXPushObject(encounter);
205 NWNXCall(NWNX_Encounter,
"GetResetTime");
211 NWNXPushInt(resetTime);
212 NWNXPushObject(encounter);
213 NWNXCall(NWNX_Encounter,
"SetResetTime");
218 NWNXPushObject(encounter);
219 NWNXCall(NWNX_Encounter,
"GetNumberOfSpawnPoints");
226 NWNXPushObject(encounter);
227 NWNXCall(NWNX_Encounter,
"GetSpawnPointByIndex");
228 float fOrientation = NWNXPopFloat();
229 vector vPosition = NWNXPopVector();
230 return Location(GetArea(encounter), vPosition, fOrientation);
235 NWNXPushObject(encounter);
236 NWNXCall(NWNX_Encounter,
"GetMinNumSpawned");
242 NWNXPushObject(encounter);
243 NWNXCall(NWNX_Encounter,
"GetMaxNumSpawned");
249 NWNXPushObject(encounter);
250 NWNXCall(NWNX_Encounter,
"GetCurrentNumSpawned");
256 NWNXPushObject(oEncounter);
257 NWNXCall(NWNX_Encounter,
"GetGeometry");
258 return NWNXPopString();
263 NWNXPushString(sGeometry);
264 NWNXPushObject(oEncounter);
265 NWNXCall(NWNX_Encounter,
"SetGeometry");
void NWNX_Encounter_SetResetTime(object encounter, int resetTime)
Set the reset time of encounter.
int NWNX_Encounter_GetCurrentNumSpawned(object encounter)
Get the current number of creatures that are spawned and alive.
int NWNX_Encounter_GetCanReset(object encounter)
Get if the encounter respawns or not.
int NWNX_Encounter_GetPlayerTriggeredOnly(object encounter)
Get if encounter is player triggered only.
int NWNX_Encounter_GetNumberOfCreaturesInEncounterList(object encounter)
Get the number of creatures in the encounter list.
int NWNX_Encounter_GetFactionId(object encounter)
Get the faction id of encounter.
void NWNX_Encounter_Destroy(object encounter)
Immediately destroys the specified encounter object.
int NWNX_Encounter_GetMinNumSpawned(object encounter)
Get the minimum amount of creatures that encounter will spawn.
struct NWNX_Encounter_CreatureListEntry NWNX_Encounter_GetEncounterCreatureByIndex(object encounter, int index)
Gets the encounter creature list entry at the specified index.
int NWNX_Encounter_GetNumberOfSpawnPoints(object encounter)
Get the number of spawn points of encounter.
void NWNX_Encounter_SetGeometry(object oTrigger, string sGeometry)
Set the geometry of an encounter with a list of vertex positions.
void NWNX_Encounter_SetPlayerTriggeredOnly(object encounter, int playerTriggeredOnly)
Set if encounter is player triggered only.
int NWNX_Encounter_GetResetTime(object encounter)
Get the reset time of encounter.
void NWNX_Encounter_SetEncounterCreatureByIndex(object encounter, int index, struct NWNX_Encounter_CreatureListEntry creatureEntry)
Set the encounter creature list entry at the specified index.
location NWNX_Encounter_GetSpawnPointByIndex(object encounter, int index)
Gets the spawn point list entry at the specified index.
void NWNX_Encounter_SetCanReset(object encounter, int reset)
Set if the encounter respawns or not.
void NWNX_Encounter_SetFactionId(object encounter, int factionId)
Set the faction id of encounter.
int NWNX_Encounter_GetMaxNumSpawned(object encounter)
Get the maximum amount of creatures that encounter will spawn.
string NWNX_Encounter_GetGeometry(object oEncounter)
Get the geometry of an encounter.
A creature list entry for an encounter.
float challengeRating
The challenge rating.
int unique
Creature will be unique to the encounter.