Teleport trigger - need advice

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
5 months 1 week ago - 5 months 1 week ago #7905 by JTP
Teleport trigger - need advice was created by JTP
If i need to make a teleport trigger that teleports all players to another room After x seconds. But only If they are still in the trigger room. How would i go about making that ?

Atm i my teleport triggers still teleport even If the player/players has left the room.
Last edit: 5 months 1 week ago by JTP.

Please Log in or Create an account to join the conversation.

More
5 months 1 week ago - 5 months 1 week ago #7912 by lacrc
Replied by lacrc on topic Teleport trigger - need advice
Were you using teleport all? What about just iterating over the players currently in the room after the wait?
Something like:
wait 5s
eval ppl %self.people%
while %ppl%
    eval next %ppl.next_in_room%
    %teleport% %ppl% 3001
    * show some messages here or force player to look maybe? *
    eval ppl %next%
done
Last edit: 5 months 1 week ago by lacrc.
The following user(s) said Thank You: thomas

Please Log in or Create an account to join the conversation.

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
5 months 1 week ago #7913 by JTP
Replied by JTP on topic Teleport trigger - need advice
Main problem i have is that people leave the room before the teleport happends and still gets teleported :)

Please Log in or Create an account to join the conversation.

More
5 months 1 week ago #7919 by Treblin
Replied by Treblin on topic Teleport trigger - need advice
Im not someone who's played much with dg scripts. However from a stylistic point of view would it perhaps make sense to either turn the room into an room with no exits, or perhaps have the player interact with an object for the teleportation to take effect? Just tossing out some ideas

Please Log in or Create an account to join the conversation.

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
5 months 1 week ago #7920 by JTP
Replied by JTP on topic Teleport trigger - need advice
Hope there is a Way, its an ambush Im trying to make...so it would look Wierd If people end up in a room with no exits first and have to wait to get ambushed :)

Please Log in or Create an account to join the conversation.

More
5 months 1 week ago #7921 by thomas
Replied by thomas on topic Teleport trigger - need advice

JTP wrote: Main problem i have is that people leave the room before the teleport happends and still gets teleported :)


Even if you do it like this?

Iacrc wrote: Were you using teleport all? What about just iterating over the players currently in the room after the wait?
Something like:

wait 5s
eval ppl %self.people%
while %ppl%
    eval next %ppl.next_in_room%
    %teleport% %ppl% 3001
    * show some messages here or force player to look maybe? *
    eval ppl %next%
done


What you are doing now is probably something like "echo, wait, echo, teleport %actor%". But if you add a room check before the teleport, problem fixed:
echo...
wait...
if (%actor.room.vnum% == %self.room.vnum%)
  %teleport%...
end

Please Log in or Create an account to join the conversation.

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
5 months 1 week ago #7923 by JTP
Replied by JTP on topic Teleport trigger - need advice
Yea the eval part sems to do it right...immorts just dont see the force look..only players....but i guess that is normal ? though annoying haha

Please Log in or Create an account to join the conversation.

More
4 months 1 week ago #8063 by Parnassus
Replied by Parnassus on topic Teleport trigger - need advice
If it's an ambush, why are you teleporting people out instead of having the ambushing mobs appear?

Regardless, have you tried using a room trigger that prevents people from leaving or entering the next room? You can look at the guildguard triggers to get some ideas. If you think the timing of that looks a bit odd, like a computer freeze where you're expecting something that doesn't happen right away, use an echo. Maybe something like: A slight noise catches your attention and you pause to look around.

Please Log in or Create an account to join the conversation.

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
4 months 1 week ago #8067 by JTP
Replied by JTP on topic Teleport trigger - need advice
Because the exit to continue Will be in the new room with the ambush mobs

Please Log in or Create an account to join the conversation.

Time to create page: 1.584 seconds