The sample script I supplied runs when the game is "started", after the level has loaded and is ready on the client side:
GameStartedFiguring out when to run the iterator for your specific needs is going to be up to you of course, but here's some ideas for events to use:
RegionStartedRegionEndedDB_CurrentLevelFor me personally, if I were to make a level that would be continuously populated with new enemies, I would use one of the temporary character creation queries to create my enemies:
TemporaryCharacterCreateAtTriggerTemporaryCharacterCreateAtPositionTemporaryCharacterCreateAtPositionOutOfSightToThe advantage of temporary characters are their corpses aren't saved when reloading the level.
If you want loot to remain despite their corpse disappearing, one possible solution would be to create a new container when they die (like a backpack or a bag) and transfer their loot to that container. Then that container could always be destroyed after it's been emptied.