I have a game where people are connected together by their party; and the issue I'm trying to solve is if a new player joins the party from super far away, everyone is dragged to them because they are connected. I'm working on a system to teleport the smaller party to the larger party, but I can't figure out what to do if the parties are equal sized. Players have an available list of their past party, and a list of the past party's Room indices.
#Issue With Teleport Logic
1 messages · Page 1 of 1 (latest)
Issue With Teleport Logic
All I need to do is figure out which party should teleport to the other party.
Whatever party has the furthest progression
im not exactly sure what you are doing in your game so its hard to pick a "best"
It's mainly about climbing, so furthest progression in this case would be highest.
so yeah, teleport to highest party
How would I detect that? Just pick a random player and get their height and compare it to another person's height?
The issue with randomness is that every player should calculate party connections and teleporting themselves.
So, to get this straight, the only concern you have as of now is teleporting someone who has just joined to the person with the furthest progress, yes?
Yes.
When the player joins, set a Float Variable to -Infinity, after For Each on Get All Players
On Loop, if the Y coordinate of the player is greater than the current value in the float variable, set the float variable to their Y coordinate and save them into a Player Variable
On Done, teleport to the player stored in the player variable
Assuming they start at the very bottom, Get Farthest could work almost as well if not identically to this method