Author Topic: Raising Dead Hostles  (Read 312 times)

Legacy_Ed Venture

  • Full Member
  • ***
  • Posts: 200
  • Karma: +0/-0
Raising Dead Hostles
« on: July 05, 2014, 05:56:52 pm »


               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
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Raising Dead Hostles
« Reply #1 on: July 05, 2014, 09:46:14 pm »


               A dead NPC will not except commands. The Action Que is inactive and cleared. This includes any actions that you assign to them, even if you would not normally view the command as an actions. commands still get processed from the top of the action que.

In short you will have to clear the reputation of the NPC after he is raised.
               
               

               
            

Legacy_Ed Venture

  • Full Member
  • ***
  • Posts: 200
  • Karma: +0/-0
Raising Dead Hostles
« Reply #2 on: July 06, 2014, 01:00:12 am »


               Lightfoot8,
Modified the trigger script that raised him with a ClearAllActions and AdjRep. Purrs like a kitten.
Thanks a ton !
You're the best !

Ed
               
               

               
            

Legacy_Talon

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +0/-0
Raising Dead Hostles
« Reply #3 on: July 07, 2014, 01:51:56 pm »


               

Interesting!


So how could be a script to create a object like a" resurrection npc" wand?