Done something very similar to this in my Forgotten Island mod. As @Blackjack Davy said create a trigger box to spawn the bandits where you want them, make the trigger box an Alias on your quest that spawns when the appropriate stage on your quest is set. That way the trigger box is not there when you do not want it to be.
First create or copy this script
Spoiler
Scriptname FI1Script extends Quest Conditional
;change the script name to what ever you want
int Property DeadBandits Auto Conditional
{tracks how many bandits are killed}
int Property TotalBandits = 5 Auto Conditional
{how many bandits do you need to kill? change 5 to your number of bandits}
function IncrementDeadBandits()
DeadBandits = DeadBandits + 1
if DeadBandits >= TotalBandits
setStage(the stage to set)
endif
endFunction
Then make the bandits Aliases on your quest, and attach this script to them
Spoiler
Scriptname BanditScript extends ReferenceAlias
FI1Script myQuestScript
;change FI1script to the same as the first script
Event OnDeath(Actor akKiller)
; increment dead count
myQuestScript = GetOwningQuest() as FI1Script
;same here change ScriptFI1 same as first script
myQuestScript.IncrementDeadBandits()
endEvent
Then place the first script on one of the stages before the one where you want the bandits to spawn. (In the kmyQuest pull down box in the quest stages window).
This way when the number of bandits are killed, the quest stage will set to the one you specify.