Aschbourne_PRC8/_module/hb_battle.nss
GetOffMyYarn 8622e5ce08 Area Changes and other fixes
added areas and ccoh,
fixed some areas to work with crafting
fixed some on death issues
added server entry/ooc
2024-08-30 10:38:04 -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)));
}
}