Amon_PRC8/_module/nss/hench_ch_heart.nss
Jaysyn904 c5cffc37af Initial Commit
Initial Commit [v1.01]
2025-04-03 19:00:46 -04:00

51 lines
1.3 KiB
Plaintext

//:://////////////////////////////////////////////////
//:: X0_CH_HEN_HEART
/*
OnHeartbeat event handler for henchmen/associates.
*/
//:://////////////////////////////////////////////////
//:: Copyright (c) 2002 Floodgate Entertainment
//:: Created By: Naomi Novik
//:: Created On: 01/05/2003
//:://////////////////////////////////////////////////
#include "X0_INC_HENAI"
#include "hench_i0_generic"
void main()
{
// Jug_Debug("*****" + GetName(OBJECT_SELF) + " heartbeat " + IntToString(GetCurrentAction()) + " busy " + IntToString(GetAssociateState(NW_ASC_IS_BUSY)));
// If the henchman is in dying mode, make sure
// they are non commandable. Sometimes they seem to
// 'slip' out of this mode
int bDying = GetIsHenchmanDying();
if (bDying)
{
int bCommandable = GetCommandable();
if (bCommandable == TRUE)
{
// lie down again
ActionPlayAnimation(ANIMATION_LOOPING_DEAD_FRONT,
1.0, 65.0);
SetCommandable(FALSE);
}
}
// If we're dying or busy, we return
// (without sending the user-defined event)
if(GetAssociateState(NW_ASC_IS_BUSY) || bDying)
{
return;
}
ExecuteScript("nw_ch_ac1", OBJECT_SELF);
}