// send NPC towards the front of the landing site //sethealth 50 onevent autoend gotolabel resumeloop onevent autobegin gotolabel nap ontrigger combatants_go_away gotolabel die :patrolloopstart gotoactor pathnode351 512.0 gotoactor pathnode450 512.0 gotoactor patrolpointred0 512.0 :patrolloopend // pretty unlikely NPCs will ever actually not have an enemy before reaching // the final destination but just in case send them to the player if this happens gotoactor player 32.0 :resumeloop // NPC is leaving autonomous mode -- resume patrol resumepatrol patrolloopstart patrolloopend best gotolabel patrolloopstart //should never get here... :nap // NPC is going autonomous -- put script to sleep until no more enemies sleep :die kill