Aller au contenu

Photo

Henchman death scripts


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
PJ156

PJ156
  • Members
  • 2 982 messages
I have a henchman who I want to die like a companion (remain in the party and ressurect at the end of the combat). I swapped out the on death script for the comp default but the guy still still dissapears on death. Is there a way to do this?

I don't want the henchman to be a companion as I don't want the pc to have inventory access rights.

Thanks

PJ

#2
MasterChanger

MasterChanger
  • Members
  • 686 messages
The first thing to check would be that the "decays" property on the blueprint is set to False and that resurrectable (not sure of the exact name of the prop) is set to true. You'd need this in addition to any OnDeath scripts you may set.

#3
PJ156

PJ156
  • Members
  • 2 982 messages
Thanks for the post Master Changer. That's not working either I'm afraid.

When you add an npc as a henchman does that affect the way his death is handled? I did not overide the scripts in the convo. So my blueprint had assoc scripts accept for death damage and combat each of which are companion.

The issue here is this person needs to be escorted back to town, on the way there is a combat and he keeps dying. I could set him as immortal or give him the natural armour of a god but I would prefer, If he dies I would prefer he resurects as a comp would.

Any more suggestions would be well recieved.

PJ 

#4
Orion7486

Orion7486
  • Members
  • 161 messages
I don't think you'll be able to keep the henchman in the party while dead, but you should be able to code it so the body hangs around. First, make sure the hench is setup as MasterChanger said.



You could write a new hench death script, getting rid of the wrapjump and bring back stuff. The important part of the hench script I think you need to pay attention to would be:

string sDeathScript = GetLocalString(OBJECT_SELF, "DeathScript");

if (sDeathScript != "")

ExecuteScript(sDeathScript, OBJECT_SELF);

From working with companion/player death, very little can be added to the ondeath script. To get around that, you can place a variable on the hench, named DeathScript. In the string field of that variable, you would have the name of a custom script that would detail the things you want to happen upon that henchman's death. In that custom script, you could put in a check to see if PC is still in combat, and when the PC is no longer in combat, then resurrect the hench.



I hope some of this helps. I may just be talking out of my rear, though.