PWE_PRC8/_module/nss/henchscout.nss
Jaysyn904 ee1dc35889 Initial Commit
Initial Commit
2025-04-03 10:29:41 -04:00

15 lines
526 B
Plaintext

void main()
{
object oClosest = GetNearestCreature(CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY,
OBJECT_SELF, 1);
if (GetIsObjectValid(oClosest)) {
SetLocalInt(OBJECT_SELF,"Scouting",TRUE);
SetLocalObject(OBJECT_SELF,"ScoutTarget",oClosest);
ClearAllActions();
ActionForceFollowObject(oClosest,1.0);
ActionForceFollowObject(oClosest,1.0);
ActionForceFollowObject(oClosest,1.0);
} else
SetLocalInt(OBJECT_SELF,"Scouting",FALSE);
}