Okay, I feel pretty stupid asking this question because I have had this henchman done and mode for a long time (I tinker with the toolset on and off) and am having a problem with him.
When he dies he spawns back at the temple but I cannot talk to him. I click on him and nothing, nada, zilch...no conversation whatsoever. I am going to copy and paste his OnDeath script, his OnSpawn script, the script that is in the TAW line of the conversation where he is supposed to tell the PC "Dying sucks. Let's get back at it!" and finally the order of the lines in his conversation. Any help would be most appreciated!
Here is his OnDeath script:
//::///////////////////////////////////////////////
//:: Henchman Death Script
//::
//:: 69_hen_death
//::
//:: Copyright © 2001 Bioware Corp.
//:://////////////////////////////////////////////
//:: <description>
//:://////////////////////////////////////////////
//::
//:: Created By: 69MEH69 Jul 2004 Henchman Death Option
//:://////////////////////////////////////////////
#include "69_hench_lib"
void HenchmanBleed(object oHench = OBJECT_SELF);
void HenchHeal(object oHench = OBJECT_SELF);
void HenchmanDeath(object oHench = OBJECT_SELF);
void HenchSalvation(object oHench);
void HenchmanLootBag(object oHench);
void main()
{
int HENCH_BLEED = GetLocalInt(GetModule(), "HENCH_BLEED");
int TEST_MODE = GetLocalInt(GetModule(), "TEST_MODE");
object oMaster = GetMaster(OBJECT_SELF);
object oPC = GetLastMaster(OBJECT_SELF);
string sName = GetName(OBJECT_SELF);
object oArea = GetArea(OBJECT_SELF);
string sTag = GetTag(OBJECT_SELF);
string sLastName = GetName(oPC);
//Test
if(TEST_MODE == 1)
{
SendMessageToPC(GetFirstPC(), "My last master is " +sLastName);
}
//Adds up number of dead henchmen under PC's watch
int nHenchDeath = GetLocalInt(oMaster, "Hench_Death");
SetLocalInt(oMaster, "Hench_Death", nHenchDeath + 1);
//Resets henchman familiar/animal companion
SetLocalInt(OBJECT_SELF, "HasCompanion", FALSE);
// I have yet to be hired but have died by unforeseen event
if(!GetIsEnemy(oPC) && !GetIsObjectValid(oMaster))
{
ClearAllActions();
SetHenchmanDying(OBJECT_SELF, FALSE);
SetPlotFlag(OBJECT_SELF, TRUE);
SetAssociateState(NW_ASC_IS_BUSY, TRUE);
SetIsDestroyable(FALSE, TRUE, TRUE);
DelayCommand(30.0, RespawnHenchman69());
}
// I may not be currently hired but am indeed an enemy to my last master
if(GetIsEnemy(oPC) && !GetIsObjectValid(oMaster))
{
ClearAllActions();
//Give XP
ExecuteScript("nw_c2_default7", OBJECT_SELF);
//ChangeToStandardFaction(OBJECT_SELF, STANDARD_FACTION_COMMONER);
ClearPersonalReputation(oPC);
ClearPersonalReputation(OBJECT_SELF, oPC);
//SetFriendly(oPC);
SetIsDestroyable(FALSE, FALSE, TRUE);
DelayCommand(59.0, SetIsDestroyable(TRUE, FALSE, TRUE));
DelayCommand(60.0, DestroyObject(OBJECT_SELF));
}
// * I am a familiar, give 1d6 damage to my master
if(GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oMaster) == OBJECT_SELF)
{
// April 2002: Made it so that familiar death can never kill the player
// only wound them.
int nDam = d6();
if (nDam >= GetCurrentHitPoints(oMaster))
{
nDam = GetCurrentHitPoints(oMaster) - 1;
}
effect eDam = EffectDamage(nDam);
FloatingTextStrRefOnCreature(63489, oMaster, FALSE);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eDam, oMaster);
}
if(HENCH_BLEED == 0)
{
if(GetIsObjectValid(oMaster))
{
if(GetAssociateType(OBJECT_SELF) == ASSOCIATE_TYPE_HENCHMAN)
{
ClearAllDialogue(oMaster, OBJECT_SELF);
ClearAllActions();
SetLastMaster(oMaster, OBJECT_SELF);
HenchmanDeath(OBJECT_SELF);
SetDidDie(TRUE, OBJECT_SELF);
SetHenchmanDying(OBJECT_SELF, FALSE);
SetPlotFlag(OBJECT_SELF, TRUE);
SetAssociateState(NW_ASC_IS_BUSY, TRUE);
SetIsDestroyable(FALSE, TRUE, TRUE);
//Spawn henchman to location specified in spawn script
DelayCommand(10.0, RespawnHenchman69());
}
}
}//End HENCH_BLEED = 0
else if(HENCH_BLEED == 1)
{
if(GetIsObjectValid(oMaster))
{
ClearAllDialogue(oMaster, OBJECT_SELF);
ClearAllActions();
SetLastMaster(oMaster, OBJECT_SELF);
//Inform player
HenchmanDeath(OBJECT_SELF);
// Mark us as in the process of dying
SetHenchmanDying(OBJECT_SELF, TRUE);
// Mark henchman PLOT & Busy
//SetPlotFlag(oHench, TRUE);
SetAssociateState(NW_ASC_IS_BUSY, FALSE, OBJECT_SELF);
// Make henchman's corpse stick around,
// be raiseable, and selectable
SetIsDestroyable(FALSE, TRUE, TRUE);
SetLocalObject(oArea, "DOA" +sTag, OBJECT_SELF);
if(GetCurrentHitPoints(OBJECT_SELF) <= -10)
{
SetDidDie(TRUE, OBJECT_SELF);
SetHenchmanDying(OBJECT_SELF, FALSE);
PlayVoiceChat(VOICE_CHAT_DEATH); // scream one last time
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DEATH), OBJECT_SELF); // make death dramatic
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), OBJECT_SELF); // now kill them
SendMessageToPC(oMaster, sName+ " has died!");
if(GetLocalInt(OBJECT_SELF, "HenchInv"))
{
HenchmanLootBag(OBJECT_SELF);
}
return;
}
DelayCommand(0.5, VoiceHealMe(TRUE));
if(GetCurrentHitPoints(OBJECT_SELF) > 0)
{
SetLocalInt(oArea, "nCHP" +sTag, -1);
}
else
{
SetLocalInt(oArea, "nCHP" +sTag, GetCurrentHitPoints(OBJECT_SELF));
}
HenchSalvation(OBJECT_SELF);
if(GetIsHenchmanDying(OBJECT_SELF) == TRUE && GetDidDie(OBJECT_SELF) == FALSE)
{
SendMessageToPC(oMaster, sName+ " is dying");
DelayCommand(6.0, HenchmanBleed(OBJECT_SELF));
}
}
} //End HENCH_BLEED = 1
else if(HENCH_BLEED == 2)
{
ClearAllDialogue(oMaster, OBJECT_SELF);
ClearAllActions();
SetLastMaster(oMaster, OBJECT_SELF);
HenchmanDeath(OBJECT_SELF);
SetDidDie(TRUE, OBJECT_SELF);
SetHenchmanDying(OBJECT_SELF, FALSE);
DelayCommand(15.0, DestroyObject(OBJECT_SELF));
} //End HENCH_BLEED = 2
else if(HENCH_BLEED == 3)
{
if(GetAssociateType(OBJECT_SELF) == ASSOCIATE_TYPE_HENCHMAN)
{
ClearAllDialogue(oMaster, OBJECT_SELF);
ClearAllActions();
HenchmanDeath(OBJECT_SELF);
SetDidDie(TRUE, OBJECT_SELF);
SetHenchmanDying(OBJECT_SELF, FALSE);
SetPlotFlag(OBJECT_SELF, TRUE);
SetAssociateState(NW_ASC_IS_BUSY, TRUE);
SetIsDestroyable(FALSE, TRUE, TRUE);
//Spawn henchman to location specified in spawn script
DelayCommand(30.0, RespawnHenchman69());
}
}//End HENCH_BLEED = 3
}
void HenchmanBleed(object oHench = OBJECT_SELF)
{
int HENCH_SALVATION = GetLocalInt(GetModule(), "HENCH_SALVATION");
int TEST_MODE = GetLocalInt(GetModule(), "TEST_MODE");
object oPC = GetLastMaster(oHench);
string sTag = GetTag(oHench);
object oArea = GetArea(oHench);
string sName = GetName(oHench);
if(HENCH_SALVATION == 1)
{
HenchSalvation(oHench);
}
/*switch (d6(1))
{
case 1: PlayVoiceChat(VOICE_CHAT_PAIN1); break;
case 2: PlayVoiceChat(VOICE_CHAT_PAIN2); break;
case 3: PlayVoiceChat(VOICE_CHAT_PAIN3); break;
case 4: PlayVoiceChat(VOICE_CHAT_HEALME); break;
case 5: PlayVoiceChat(VOICE_CHAT_NEARDEATH); break;
case 6: PlayVoiceChat(VOICE_CHAT_HELP); break;
}*/
if((GetIsHenchmanDying(oHench) == TRUE) && (GetDidDie(oHench) == FALSE))
{
int nCHP = GetLocalInt(oArea, "nCHP" +sTag);
SetLocalInt(oArea, "nCHP" +sTag, nCHP - 1);
nCHP = GetLocalInt(oArea, "nCHP" +sTag);
string sCHP = IntToString(nCHP);
SendMessageToPC(oPC, sName+ " has " +sCHP+ " hit points!");
//Test
if(TEST_MODE == 1)
{
int nHP = GetCurrentHitPoints(OBJECT_SELF);
string sHP = IntToString(nHP);
SendMessageToPC(oPC, sName+ " has " +sHP+ " hit points");
}
if(GetLocalInt(oArea, "nCHP" +sTag) >= 1)
{
ClearAllActions();
SendMessageToPC(oPC, sName+ " is healed!");
PostRespawnCleanup69(oHench);
PartialRes(oHench);
HireHenchman69(oPC, oHench);
if(GetLocalInt(oArea, "nCHP" +sTag) >= 20)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(GetMaxHitPoints(oHench)), oHench);
}
return;
}
else if(GetLocalInt(oArea, "nCHP" +sTag) <= -10)
{
SetDidDie(TRUE, oHench);
SetHenchmanDying(oHench, FALSE);
SendMessageToPC(oPC, sName+ " is beyond healing!");
PlayVoiceChat(VOICE_CHAT_DEATH); //scream one last time
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DEATH), oHench); // make death dramatic
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oHench); // now kill them
if(GetLocalInt(oHench, "HenchInv"))
{
HenchmanLootBag(oHench);
}
return;
}
else
{
SendMessageToPC(oPC, sName+ " is dying");
DelayCommand(6.0, HenchmanBleed(oHench));
}
}
}
void HenchHeal(object oHench = OBJECT_SELF)
{
object oPC = GetLastMaster(oHench);
string sName = GetName(oHench);
object oArea = GetArea(oHench);
string sTag = GetTag(oHench);
int nCHP = GetLocalInt(oArea, "nCHP" +sTag);
SetLocalInt(oArea, "nCHP" +sTag, nCHP + 1);
nCHP = GetLocalInt(oArea, "nCHP" +sTag);
string sCHP = IntToString(nCHP);
SendMessageToPC(oPC, sName+ " has " +sCHP+ " hit points!");
if(nCHP >= 1)
{
PostRespawnCleanup69(oHench);
PartialRes(oHench);
if((GetResurrected(oPC) == TRUE) && (GetDidDie(oHench) == TRUE))
{
HireHenchman69(oPC);
}
else if(GetDidDie(oHench) == FALSE)
{
HireHenchman69(oPC);
}
return;
}
else
{
SendMessageToPC(oPC, sName+ " is healing");
DelayCommand(6.0, HenchHeal(oHench));
}
}
void HenchmanDeath(object oHench = OBJECT_SELF)
{
object oPC = GetLastMaster(oHench);
object oBlood = CreateObject(OBJECT_TYPE_PLACEABLE,"plc_bloodstain", GetLocation(oHench));
//Remove blood after a while
DestroyObject(oBlood,60.0f);
// Henchman death notification
string sHenchName = GetName(oHench);
SendMessageToPC(oPC, sHenchName+ " has fallen!");
RemoveHenchman(oPC, oHench);
}
void HenchSalvation(object oHench = OBJECT_SELF)
{
object oPC = GetLastMaster(oHench);
string sTag = GetTag(oHench);
object oArea = GetArea(oHench);
string sName = GetName(oHench);
int nSalvation = d10(1);
if(nSalvation == 1 && GetDidDie(oHench) == FALSE)
{
int nGender = GetGender(oHench);
string sGender;
if(nGender == GENDER_FEMALE)
{
sGender = "her";
}
else if(nGender == GENDER_MALE)
{
sGender = "his";
}
else
{
sGender = "it's";
}
SetHenchmanDying(oHench, FALSE);
PlayVoiceChat(VOICE_CHAT_LAUGH);
SendMessageToPC(oPC, sName+ " has avoided death and is recovering from " +sGender+ " wounds!");
DelayCommand(6.0, HenchHeal(oHench));
}
}
void HenchmanLootBag(object oHench = OBJECT_SELF)
{
object oPC = GetLastMaster(oHench);
location lLoc = GetStepRightLocation(oHench);
string sTag = GetTag(oHench);
object oLootBag = CreateObject(OBJECT_TYPE_ITEM, "henchmanbackpack", lLoc, FALSE, sTag+ "BAG");
MoveHenchmanItems69(oLootBag, oHench);
}
Here is his OnSpawn script:
//::///////////////////////////////////////////////
//:: Associate: On Spawn In
//:: 69_hen_spawnin
//:: Copyright © 2001 Bioware Corp.
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Nov 19, 2001
//:://////////////////////////////////////////////
#include "69_INC_HENAI"
void main()
{
//RESPAWN WAYPOINT INSTRUCTIONS
//Create a specific respawn location for henchman with a waypoint with TAG "WP_Respawn_'TAG'"
//where 'TAG' is the TAG of the NPC
//Create a default general respawn location with waypoint with TAG "NW_DEATH_TEMPLE"
//Create a Home waypoint with TAG "WP_Home_'TAG'" where 'TAG' is the TAG of the NPC
// This is where the Hench will go when they quit the PC
//Sets default level up package based on settings in henchman's blueprint
//This may be changed through henchman dialog, do not edit
SetLocalInt(OBJECT_SELF, "ClassPackage", GetCreatureStartingPackage(OBJECT_SELF));
//Set variable for level up, do not edit
SetLocalInt(OBJECT_SELF, "NewClass", -1);
//Sets up the HENCH_LAG for this henchman,
//Replace the 0 with any number the henchman lags(+)
//or leads(-) in level. Save this script as something
//else per this henchman. This allows multileveled
//henchman
//Minimum of -1,-2,-3... Maximum of 1,2,3... Same Level = 0
SetLocalInt(OBJECT_SELF, "HenchLag", 0);
//Sets the Maximum Level the Henchman may level
//Default: 40
SetLocalInt(OBJECT_SELF, "HENCH_MAXLEVEL", 40);
//Sets whether or not PC is allowed into henchman inventory
//TRUE: Inventory is accessible
//FALSE: Inventory is not accessible
//Default: TRUE
SetLocalInt(OBJECT_SELF, "HenchInv", TRUE);
//Sets whether or not initial henchman inventory is no drop
//TRUE: Inventory is droppable
//FALSE: Inventory is not droppable
//Default: TRUE
SetLocalInt(OBJECT_SELF, "HenchInvDrop", TRUE);
//Sets the distance from the enemy that the henchman will switch to melee weapons
SetLocalFloat(OBJECT_SELF, "HenchRange", 5.0);
//Sets up the special henchmen listening patterns
SetAssociateListenPatterns();
// Set additional henchman listening patterns
bkSetListeningPatterns();
//Equips melee weapon by default
//Equips ranged weapons by default if TRUE.
SetAssociateState(NW_ASC_USE_RANGED_WEAPON, FALSE);
//Sets the default distance that the henchman will follow
//the PC, only uncomment one of the following three
SetAssociateState(NW_ASC_DISTANCE_2_METERS);
//SetAssociateState(NW_ASC_DISTANCE_4_METERS);
//SetAssociateState(NW_ASC_DISTANCE_6_METERS);
//End default distances
SetAssociateState(NW_ASC_POWER_CASTING);
SetAssociateState(NW_ASC_HEAL_AT_50);
SetAssociateState(NW_ASC_RETRY_OPEN_LOCKS);
SetAssociateState(NW_ASC_DISARM_TRAPS);
SetAssociateState(NW_ASC_MODE_DEFEND_MASTER, FALSE);
// April 2002: Summoned monsters, associates and familiars need to stay
// further back due to their size.
if (GetAssociate(ASSOCIATE_TYPE_HENCHMAN, GetMaster()) == OBJECT_SELF ||
GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, GetMaster()) == OBJECT_SELF ||
GetAssociate(ASSOCIATE_TYPE_DOMINATED, GetMaster()) == OBJECT_SELF ||
GetAssociate(ASSOCIATE_TYPE_FAMILIAR, GetMaster()) == OBJECT_SELF ||
GetAssociate(ASSOCIATE_TYPE_SUMMONED, GetMaster()) == OBJECT_SELF)
{
SetAssociateState(NW_ASC_DISTANCE_4_METERS);
}
// SPECIAL CONVERSATION SETTTINGS
//SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
//SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
// This causes the creature to say a special greeting in their conversation file
// upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired
// greeting in order to designate it. As the creature is actually saying this to
// himself, don't attach any player responses to the greeting.
//Set starting location
SetAssociateStartLocation();
// For some general behavior while we don't have a master,
// let's do some immobile animations
// SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
// For some general behavior while we don't have a master,
// let's do some mobile animations
// SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
// **** Special Combat Tactics *****//
// * These are special flags that can be set on creatures to
// * make them follow certain specialized combat tactics.
// * NOTE: ONLY ONE OF THESE SHOULD BE SET ON A SINGLE CREATURE.
// * Ranged attacker
// * Will attempt to stay at ranged distance from their
// * target.
// SetCombatCondition(X0_COMBAT_FLAG_RANGED);
// * Defensive attacker
// * Will use defensive combat feats and parry
// SetCombatCondition(X0_COMBAT_FLAG_DEFENSIVE);
// * Ambusher
// * Will go stealthy/invisible and attack, then
// * run away and try to go stealthy again before
// * attacking anew.
// SetCombatCondition(X0_COMBAT_FLAG_AMBUSHER);
// * Cowardly
// * Cowardly creatures will attempt to flee
// * attackers.
// SetCombatCondition(X0_COMBAT_FLAG_COWARDLY);
// CUSTOM USER DEFINED EVENTS
/*
The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the
On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined
events user 1000 - 1010
*/
//SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002
//SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005
//SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006
//SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008
//SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003
//SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004
//SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007
if(GetLocalInt(OBJECT_SELF, "HenchInvDrop") == FALSE)
{
HenchmanNoDropItems69(TRUE, OBJECT_SELF);
}
}
Here is the script that is on the TAW of the proper conversation line:
//:://////////////////////////////////////////////////
//:: X0_D2_HEN_DIED
//:: Copyright © 2002 Floodgate Entertainment
//:://////////////////////////////////////////////////
/*
Returns TRUE if this henchman works for this player and
the henchman had died.
*/
//:://////////////////////////////////////////////////
//:: Created By: Naomi Novik
//:: Created On: 09/13/2002
//:://////////////////////////////////////////////////
#include "x0_i0_henchman"
int StartingConditional()
{
if (GetKilled(GetPCSpeaker()) && GetDidDie())
return TRUE;
return FALSE;
}
Here is the order of his conversation:
Line 1: Henchman is currently unconscious and will likely die if he is not given aid very soon.
Line 2: By Torm, no matter how many times that happens, you never get used to it. It's a most unsettling feeling. Could we avoid that in the future?
Line 3: Wait, may I have a word with you?
Line 4: Yes, what do you need?
Line 5: Interjection
Line 6: Interjection
There is no line for him to be added to the party at the beginning of the module because he is added through dialog with another NPC. Also, the interjections work beautifully. I just can't talk to him after he respawns at the temple.
Any ideas?
Thanks!