Hiya everyboby,
Been working on this all morning.
I spawned a nonhostle NPC. When the PC uses a placeable(via convo), NPC turns hostle and attacks(AdjustRep). NPC is killed. PC enters new area and has convo with NPC2. NPC2 follows PC to dead NPC. NPC2 cast raise dead on dead NPC. NPC is raised and attacks PC.
NPC has nw_c2_default scripts except for custom On Death.
NPC has custom faction. Only creature in mod using it. Non Global
NPC has No Permanent Death checked. Unchecked did not help.
I have a simple on death for NPCs killed where there are no witnesses.
This keeps other NPCs of the same faction from attacking.
void main()
{
object oPC = GetLastKiller();
object oDead = OBJECT_SELF;
AdjustReputation(oPC,oDead,100);
}
The problem is raising the dead NPC. I have tried AdjustingRep on the ON Death, On Spawn, and the trigger that gets the second NPC to cast the Raise Dead.
I have also tried ClearPersonalRep same. I have also tried ClearAllActions(TRUE) the same.
This is the latest version of the OnDeath
void main()
{
object oPC = GetLastKiller();
object oDead = OBJECT_SELF;
string sNote = "royalcorresponde";
string sKey = "lighthousekey";
string sMes = "Your attacker dropped a couple of items.";
AssignCommand(oPC,ClearAllActions(TRUE));
AssignCommand(oDead,ClearPersonalReputation(oPC,oDead));
SendMessageToPC(oPC,sMes);
CreateItemOnObject(sNote,oPC,1);
CreateItemOnObject(sKey,oPC,1);
}
Can anyone tell me how to get this guy to come up without swinging ?
Ed