Aschbourne_PRC8/_module/nss/hb_battle.nss
GetOffMyYarn 69879d6957 Areas and Fixes
Added CCOH and missing areas
Changed some areas to be craftable,
Fixed some on death issues,
Fixed the Gaurd
2024-08-30 11:38:44 -04:00

20 lines
498 B
Plaintext

/**
hb_battle
OnHeartbeat: Forces this NPC to stay close to a waypoint named DefensePoint
J.D. Robertson, 2002
*/
#include "i_battle"
void main()
{
// If too far from your defense point, run back to it
if (InBattle() &&
TooFarFrom("DefensePoint"))
{
object waypoint = GetNearestObjectByTag("DefensePoint");
ActionDoCommand(ActionForceMoveToObject(waypoint, TRUE, IntToFloat(d6())));
ActionDoCommand(SetFacing(GetFacing(waypoint)));
}
}