Morning everyone. Finally got round to creating a module in NWN. Only taken a few years....
'>
I'm looking to see if it's possible to remove an encounter through a script.
I've used a script in the OnDeath section of an object, so when it's destroyed it removes the encounter.
This is what I've used:
void main(){
object oPC = GetLastKiller();
if (!GetIsPC(oPC)) return;
object oTarget;oTarget = GetObjectByTag("et_TapestryWarriors");
DestroyObject(oTarget, 0.0);
}
But the encounter is not removed. Is it the script, where I'm using it, or the fact that you cannot remove an encounter? Would I be better to get the encounter to run only if a local variable is set? And on the destruction of the item, the variable is then changed?
I'll hopefully start to get my head around this scripting business.
Cheers all.
Bri.