generated from Jaysyn/ModuleTemplate
124 lines
3.9 KiB
Plaintext
124 lines
3.9 KiB
Plaintext
//:://////////////////////////////////////////////////
|
|
//:: X0_CH_HEN_SPAWN
|
|
//:: Copyright (c) 2002 Floodgate Entertainment
|
|
//:://////////////////////////////////////////////////
|
|
/*
|
|
Henchman-specific OnSpawn handler for XP1. Based on NW_CH_AC9 by Bioware.
|
|
*/
|
|
//:://////////////////////////////////////////////////
|
|
//:: Created By: Naomi Novik
|
|
//:: Created On: 10/09/2002
|
|
//:://////////////////////////////////////////////////
|
|
|
|
#include "x0_inc_henai"
|
|
#include "x2_inc_banter"
|
|
#include "x2_inc_globals"
|
|
|
|
// * there are only a couple potential interjections henchmen can say in c3
|
|
void StrikeOutStrings(object oNathyrra)
|
|
{
|
|
SetLocalString(oNathyrra, "X2_L_RANDOMONELINERS", "26|27|28|29|30|");
|
|
SetLocalString(oNathyrra, "X2_L_RANDOM_INTERJECTIONS", "6|7|");
|
|
}
|
|
|
|
void main()
|
|
{
|
|
string sAreaTag = GetTag(GetArea(OBJECT_SELF));
|
|
string sModuleTag = GetTag(GetModule());
|
|
string sMyTag = GetTag(OBJECT_SELF);
|
|
|
|
|
|
// * Setup how many random interjectiosn and popups they have
|
|
if (sMyTag == "x2_hen_deekin")
|
|
{
|
|
SetNumberOfRandom("X2_L_RANDOMONELINERS", OBJECT_SELF, 50);
|
|
SetNumberOfRandom("X2_L_RANDOM_INTERJECTIONS", OBJECT_SELF, 10);
|
|
}
|
|
else
|
|
if (sMyTag == "x2_hen_daelan")
|
|
{
|
|
SetNumberOfRandom("X2_L_RANDOMONELINERS", OBJECT_SELF, 20);
|
|
SetNumberOfRandom("X2_L_RANDOM_INTERJECTIONS", OBJECT_SELF, 2);
|
|
}
|
|
else
|
|
if (sMyTag == "x2_hen_linu")
|
|
{
|
|
SetNumberOfRandom("X2_L_RANDOMONELINERS", OBJECT_SELF, 20);
|
|
SetNumberOfRandom("X2_L_RANDOM_INTERJECTIONS", OBJECT_SELF, 2);
|
|
}
|
|
else
|
|
if (sMyTag == "x2_hen_sharwyn")
|
|
{
|
|
SetNumberOfRandom("X2_L_RANDOMONELINERS", OBJECT_SELF, 20);
|
|
SetNumberOfRandom("X2_L_RANDOM_INTERJECTIONS", OBJECT_SELF, 4);
|
|
}
|
|
else
|
|
if (sMyTag == "x2_hen_tomi")
|
|
{
|
|
SetNumberOfRandom("X2_L_RANDOMONELINERS", OBJECT_SELF, 20);
|
|
SetNumberOfRandom("X2_L_RANDOM_INTERJECTIONS", OBJECT_SELF, 4);
|
|
}
|
|
else
|
|
if (sMyTag == "H2_Aribeth")
|
|
{
|
|
SetNumberOfRandom("X2_L_RANDOMONELINERS", OBJECT_SELF, 20);
|
|
SetNumberOfRandom("X2_L_RANDOM_INTERJECTIONS", OBJECT_SELF, 2);
|
|
}
|
|
else
|
|
// * valen and Nathyrra have certain random lines that only show up in
|
|
// * in Chapter 2 (Chapter 3 they'll get this variable set on them
|
|
// * as well, with different numbers)
|
|
// * Basically #1-5 are Chapter 2 only, 26-30 are Chapter 3 only. The rest can show up anywhere
|
|
if (sMyTag == "x2_hen_nathyra" || sMyTag == "x2_hen_valen")
|
|
{
|
|
// * only fire this in Chapter 2. THey setup differently in the transition from C2 to C3
|
|
if (GetTag(GetModule()) == "x0_module2")
|
|
{
|
|
SetNumberOfRandom("X2_L_RANDOMONELINERS", OBJECT_SELF, 25);
|
|
SetNumberOfRandom("X2_L_RANDOM_INTERJECTIONS", OBJECT_SELF, 3);
|
|
}
|
|
else
|
|
{
|
|
StrikeOutStrings(OBJECT_SELF);
|
|
}
|
|
|
|
}
|
|
|
|
//Sets up the special henchmen listening patterns
|
|
SetAssociateListenPatterns();
|
|
|
|
// Set additional henchman listening patterns
|
|
bkSetListeningPatterns();
|
|
|
|
// Default behavior for henchmen at start
|
|
SetAssociateState(NW_ASC_POWER_CASTING);
|
|
SetAssociateState(NW_ASC_HEAL_AT_50);
|
|
SetAssociateState(NW_ASC_RETRY_OPEN_LOCKS);
|
|
SetAssociateState(NW_ASC_DISARM_TRAPS);
|
|
|
|
// * July 2003. Set this to true so henchmen
|
|
// * will hopefully run off a little less often
|
|
// * by default
|
|
// * September 2003. Bad decision. Reverted back
|
|
// * to original. This mode too often looks like a bug
|
|
// * because they hang back and don't help each other out.
|
|
//SetAssociateState(NW_ASC_MODE_DEFEND_MASTER, TRUE);
|
|
SetAssociateState(NW_ASC_DISTANCE_2_METERS);
|
|
|
|
//Use melee weapons by default
|
|
SetAssociateState(NW_ASC_USE_RANGED_WEAPON, FALSE);
|
|
|
|
// Set starting location
|
|
|
|
|
|
// Set respawn location
|
|
|
|
|
|
// For some general behavior while we don't have a master,
|
|
// let's do some immobile animations
|
|
SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
|
|
|
|
|
|
}
|
|
|