Jump to content

Home

Question about NPCs fighting


Godric Volturi

Recommended Posts

I think I figured it out!

Right you do the thing I said before and then write a script to change their faction to neutral. Attach the script to some other dialogue say a random twi'lek standing around so when you talk to it the things (in my case Zakkeg and rancor) stop fighting and that should work. Haven't tested it though .

Link to comment
Share on other sites

That's pretty much it. You also have to check the box on the utc's Advanced tab for Minimum 1HP, so the npc's will not die before you tt them. You also need a script, if you want them to regain their strengh after fighting. I use this one, it seems to work:

 

void main() {

 

 

object oNPC1 = GetObjectByTag("YOURTAGHERE");

object oNPC2 = GetObjectByTag("YOURTAGHERE");

 

int nHealth1 = GetMaxHitPoints(oNPC1) - GetCurrentHitPoints(oNPC1);

int nHealth2 = GetMaxHitPoints(oNPC2) - GetCurrentHitPoints(oNPC2);

 

effect eHeal1 = EffectHeal(nHealth1);

effect eHeal2 = EffectHeal(nHealth2);

 

ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal1, oNPC1);

ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal2, oNPC2);

 

 

}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...