Place this script on your actors (assuming they are quest aliases)
Scriptname aaaaaBanditScript extends ReferenceAlias
aaaaa1questScript myQuestScript
Event OnDeath(Actor akKiller)
; increment dead count
myQuestScript = GetOwningQuest() as aaaaaquestScript
myQuestScript.IncrementDeadBandits()
endEvent
Then Place this script on your quest(in the scripts tab)
Scriptname aaaaa1questscript extends Quest Conditional
int Property DeadBandits Auto Conditional
{tracks how many bandits are killed}
int Property TotalBandits Auto Conditional
{how many bandits do you need to kill?}
function IncrementDeadBandits()
DeadBandits = DeadBandits + 1
if DeadBandits >= TotalBandits
MyDoor.SetOpen(true)
endif
endfunction
ObjectReference Property myDoor Auto
Then Call the quest script in any stage of the quest before you need to kill the actors using the kmyQuest dropdown.
The fill the properties in the CK. Just a side note, just fill the door, and Total number of actors or bandits in the case of the example.
Then after the correct number of bandits are killed, the door will open. Make sure the door is a two state activator like a norPortcullis or similar.