Greetings, had no trouble setting up my henchman (who is mandatory for a small while) and I want to make it, that if he dies, the PC dies as well. The reason is I do not allowing respawning in my module, and the henchman must surive as part of the story.
How do I make it that if the henchman dies, the PC dies too
Débuté par
simomate
, juin 20 2011 06:34
#1
Posté 20 juin 2011 - 06:34
#2
Posté 20 juin 2011 - 06:52
Basically you should just be able to add a couple lines to your default henchmen OnDeath script. For example:
"x2_hen_death" (modified. the 2 red lines are all I added to the default script):
//::///////////////////////////////////////////////
//:: Henchman Death Script
//::
//:: X2_HEN_DEATH.nss
//::
//:: Copyright © 2001 Bioware Corp.
//:://////////////////////////////////////////////
//:: <description>
//:://////////////////////////////////////////////
//::
//:: Created By:
//:: Modified by: Brent, April 3 2002
//:: Removed delay in respawning
//:: the henchman - caused bugs
//:: Modified November 14 2002
//:: - Henchem will now stay dead. Need to be raised
//:://////////////////////////////////////////////
//::///////////////////////////////////////////////
//:: Greater Restoration
//:: NW_S0_GrRestore.nss
//:: Copyright © 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Removes all negative effects of a temporary nature
and all permanent effects of a supernatural nature
from the character. Does not remove the effects
relating to Mind-Affecting spells or movement alteration.
Heals target for 5d8 + 1 point per caster level.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Jan 7, 2002
//:://////////////////////////////////////////////
//:: VFX Pass By: Preston W, On: June 20, 2001
//:: Modifications To Support Horses By: Deva Winblood, On: April 17th, 2008
#include "nw_i0_generic"
#include "nw_i0_plot"
#include "x0_i0_henchman"
#include "x3_inc_horse"
void main()
{
effect eDeath = EffectDeath();
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, GetMaster(OBJECT_SELF));
SetLocalString(OBJECT_SELF,"sX3_DEATH_SCRIPT","x2_hen_death");
if (HorseHandleDeath()) return;
DeleteLocalString(OBJECT_SELF,"sX3_DEATH_SCRIPT");
etc...........
Hope that works for ya. Good luck.
"x2_hen_death" (modified. the 2 red lines are all I added to the default script):
//::///////////////////////////////////////////////
//:: Henchman Death Script
//::
//:: X2_HEN_DEATH.nss
//::
//:: Copyright © 2001 Bioware Corp.
//:://////////////////////////////////////////////
//:: <description>
//:://////////////////////////////////////////////
//::
//:: Created By:
//:: Modified by: Brent, April 3 2002
//:: Removed delay in respawning
//:: the henchman - caused bugs
//:: Modified November 14 2002
//:: - Henchem will now stay dead. Need to be raised
//:://////////////////////////////////////////////
//::///////////////////////////////////////////////
//:: Greater Restoration
//:: NW_S0_GrRestore.nss
//:: Copyright © 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Removes all negative effects of a temporary nature
and all permanent effects of a supernatural nature
from the character. Does not remove the effects
relating to Mind-Affecting spells or movement alteration.
Heals target for 5d8 + 1 point per caster level.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Jan 7, 2002
//:://////////////////////////////////////////////
//:: VFX Pass By: Preston W, On: June 20, 2001
//:: Modifications To Support Horses By: Deva Winblood, On: April 17th, 2008
#include "nw_i0_generic"
#include "nw_i0_plot"
#include "x0_i0_henchman"
#include "x3_inc_horse"
void main()
{
effect eDeath = EffectDeath();
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, GetMaster(OBJECT_SELF));
SetLocalString(OBJECT_SELF,"sX3_DEATH_SCRIPT","x2_hen_death");
if (HorseHandleDeath()) return;
DeleteLocalString(OBJECT_SELF,"sX3_DEATH_SCRIPT");
etc...........
Hope that works for ya. Good luck.
#3
Posté 20 juin 2011 - 06:57
Thanks for the quick response to both my threads. Let you know if they work out
#4
Posté 21 juin 2011 - 07:28
It worked! Thanks loads. I also added a message that lets you know your henchman dies and as a result it's game over. Just so people don't get confused and wonder why the hell they just died





Retour en haut






