Aschbourne_PRC8/_module/nss/combat_battle.nss

31 lines
683 B
Plaintext
Raw Permalink Normal View History

2024-06-14 10:48:20 -04:00
// Modification of NW_C2_DEFAULT3
// NPC will stay close to a waypoint named DefensePoint
#include "NW_I0_GENERIC"
#include "i_battle"
void main()
{
// Ignore everything and return to the waypoint once we get away from it
if (InBattle() &&
TooFarFrom("DefensePoint"))
{
return;
}
// Otherwise do default behavior
if(GetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL))
{
DetermineSpecialBehavior();
}
else if(!GetSpawnInCondition(NW_FLAG_SET_WARNINGS))
{
DetermineCombatRound();
}
if(GetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT))
{
SignalEvent(OBJECT_SELF, EventUserDefined(1003));
}
}