I've never had to set up a loop before, so I need a quick walkthrough. It's my understanding that papyrus now has go to functions and loops and whatnot, which I think are what I need here?
Any pointers are appreciated.

AJV
; Function to know if I'm near the player (whether I can be safely enabled or disabled)bool Function IsNearPlayer() Actor player = Game.GetPlayer() Cell targetCell = self.GetParentCell() Cell playerCell = player.GetParentCell() if (targetCell != playerCell) ; player and target are in different cells if (targetCell && targetCell.IsInterior() || playerCell && playerCell.IsInterior()) ; in different cells and at least one is an interior ; -- we can safely enable or disable return false else ; both in an exterior -- no means of testing ; worldspace at the moment, so this will do. if (player.GetDistance(self) > 3000) ; pretty darned far away -- safe return false else ; too close for comfort return true endif endif else ; in the same cell -- err on the side of caution return true endifendFunction
;once all bandits are dead and unloaded disable themEvent OnCellDetach() If (FSSQ01.GetStage() >= 10) && ((Self as Actor).IsDead() == 1) Self.Disable() EndIfEndEvent