Hi!
I'm using this script for NWN1 and it works fine, but it won't for NWN2. It has a 50% chance to spawn the npc "poe" when the player enters the area. Even if I set to <=100 the spawn won't fire.
location lTarget;
object oSpawn;
object oTarget;
void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
int DoOnce = GetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF));
if (DoOnce==TRUE) return;
SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);
if (d100()<=50)
{
oTarget = GetWaypointByTag("poe_inicio");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "poe", lTarget);
}
}
Can you guys please tell me how to make this work for NWN2? Thanks.





Retour en haut






