MMD_PRC8/_module/nss/mp_hen_spawn.nss
Jaysyn904 adeff59f82 Initial commit
Initial commit.
2024-08-02 23:18:00 -04:00

65 lines
2.1 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_i0_anims"
#include "x0_inc_henai"
#include "x2_inc_switches"
void main()
{
string sTag = GetTag(OBJECT_SELF);
object oReset = GetWaypointByTag(sTag);
object oRespawn = GetObjectByTag("NW_DEATH_TEMPLE");
location lRespawn = GetLocation(oRespawn);
location lReset = GetLocation(oReset);
//SetLocalInt(OBJECT_SELF,"X2_L_SPAWN_USE_AMBIENT",1);
//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, FALSE);
SetAssociateState(NW_ASC_DISARM_TRAPS);
SetAssociateState(NW_ASC_MODE_DEFEND_MASTER, FALSE);
SetAssociateState(NW_ASC_DISTANCE_2_METERS);
//Use melee weapons by default
SetAssociateState(NW_ASC_USE_RANGED_WEAPON, FALSE);
// Set starting location
//SetAssociateStartLocation();
// Set respawn location
// SetRespawnLocationSpecific(OBJECT_SELF, lRespawn);
// For some general behavior while we don't have a master,
// let's do some immobile animations
//SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
//JumpToLocation(lReset);
int iRoll = Random(60)+1;
string sTag2 = "henchwp";
object oWP = GetObjectByTag(sTag2+IntToString(iRoll));
//ExecuteScript("nw_c2_default9",OBJECT_SELF);
//ActionForceMoveToObject(oWP,FALSE,3.0f);
JumpToObject(oWP);
//DelayCommand(6.0f,ActionRandomWalk());
if (GetIsHired(OBJECT_SELF)!=TRUE) SetAnimationCondition(NW_ANIM_FLAG_IS_ACTIVE);
}