So here's where I placed the script. It was placed in my story level:
IF
DB_CheckLevelStart("TheOldRuin")
AND
DB_CurrentLevel("NorthHall")
THEN
GoalCompleted;
IF
GameStarted(_,_)
THEN
CharacterLaunchIterator("Detect_Events_OnCharacterIterate");
IF
StoryEvent((CHARACTERGUID)_Character, "Detect_Events_OnCharacterIterate")
AND
_Character != NULL_00000000-0000-0000-0000-000000000000
AND
CharacterGetDisplayName(_Character,_,_Name)
AND
StringConcatenate("[Detect] Iterator ran on ", _Name, _Message)
THEN
DebugBreak(_Message);
IF
StoryEvent(NULL_00000000-0000-0000-0000-000000000000, "Detect_Events_OnCharacterIterate")
THEN
DebugBreak("[Detect] Character iteration finished.");
testing:
start game run outside the town walls kill something, run back inside town walls, zone into another level. Then zone back to the level we are testing run out to the monster copse and its still there.
LaughingLeader's example was an illustration of how to use the CharacterLaunchIterator() Osiris call, not code that literally does what you asked. The above code logs each character as it receives the event from the iterator (which you can see in the editor log or in the osirislog.log file). It does not actually set anything
off-stage.
I would strongly recommend you to watch the Osiris tutorial videos linked from
the Osiris wiki page and to then read the "Osiris Overview" linked from the same page. LaughingLeader's own
tutorial on Osiris is also good.