Jan wrote: Unfortunately it doesnt work, leaving the rest of the group in the room with No exist
Ahh - I misunderstood you.
So, what Parna states is correct - you will need to loop over the followers to make them follow their leader to the new room.
In pseudoscript, you'll need to do one of these things:
- When anyone enters, regardless of whether they're the leader, add a timer to get them to move, or
- When someone with followers is moved out, the followers are moved as well.
- When anyone enters, they are marked to be teleported out later. A different trigger handles the eviction.
The first way is easy. As long as it's just a single character, it "just works" with %wait% and %teleport%. However, as long as we are running the script, we cannot trigger it again - even if we're currently in a wait state. This means you are actually only triggering on the first character to enter. Thus only the first character is getting teleported.
The second way is the way of the loop. However, having a group in a room for 60 seconds adds a lot of error sources - what if they ungroup while in the room? What if they fight, and the leader dies? This is the way of insanity - the checks will eventually outgrow the buffer size.
So, the third way presents itself. A simple trigger that just saves the entry time on the player.
Code:
eval time_to_leave %time.hour% + 1
if (%time_to_leave% == 24)
set time_to_leave 0
end
remote time_to_leave %actor.id%
And then another trigger, triggering the actual move (this can be an enter trigger as well):
Code:
while 1
wait 30 s
eval target_char %self.people%
while %target_char%
* Set the next target before this one is moved
set tmp_target %target_char.next_in_room%
* actually check if _this_ guy needs a move...
if (%time.hour% == %target_char.time_to_leave%)
%teleport% %actor% 11990
%force% %actor% look
end
* Find next target
set target_char %tmp_target%
done
done
This last trigger will, every 30 seconds, check if there are any characters with the given hour set as the time for departure.
The usual notes about this being browser code apply.