How to make a group teleporter?

How can i go about collecting the indexes from all the players standing a current location via blueprint?

My goal: Players get walk in to a teleport room and get teleported to another section of the map based on a trigger box.

My problem: how to collect and teleport only the players that are standing in the box.

From there, I’m assuming the use of an array to plug in to the INT slot of GetPlayerCharacter? or am I on the wrong track?

Any help appreciated. Thanks!

Howdy!

I took a look at how to perhaps going about setting something like this up, feel free to modify it to make it fit your needs and make it function better:

Any character that enters the TriggerBox has a variable set to true inside their character Blueprint (clearing the variable when leaving the box). I then used the Get All Actors Of Class node, followed by a ForEachLoop which casts the result to MyCharacter Blueprint.

I then Branch to check each character has the Enable Teleport variable set to True, and if so, when T is pressed - I use the Teleport node to move all characters that have Enable Teleport to the specified TargetPoint I placed in my level.

You could skip using the T input to Teleport, however that would mean any time a player enters the TriggerBox, they would be teleported instantly (I used this instead to let everyone enter the box, and when ready, can press a button to teleport everyone together).

Here’s the thing, this only works from the Server’s perspective and teleports the server character and all client characters. Still looking into making this work so that a Client can press T to teleport the other clients and the sever character.

Will update this down the road after I review the [Networking Blueprint Tutorials][2] again! :slight_smile:

-W

Awesome, thank you for your reply! I did not think of actually changing a variable on the character itself. Also did not see that there was a “Teleport” node in blueprints. That’s convenient :smiley:

I’ll see what I can come up with to fit this in to what I’m trying to accomplish.

A networking update would be great as well. The intention is indeed to have this working on a dedicated server.

Thanks again!

Ok, so after setting up basically the same mechanism, it teleports the first client only (I’m running dedicated server with 3 clients.) I’m assuming this is correct because there needs to be some networking set up with it. I’m also using the Shooter Demo pawn to test with. Not sure if that makes a difference.

Hi i am not a scripter by any strach of the imagination, but I’m loving the blueprint system.

So I’m having trouble getting my teleporter system to work like you describe here. how do i get the variable “set” nodes to appear after “cast to my character”? I’m trying to follow along but got stuck there. I’m also having trouble getting the node that sets the condition for the branch node to appear as well… :frowning:

Create the variable in the character by adding a boolean. make sure to mark it “Editable”

Then, in any other blueprint, drag off the Other actor and cast to your character. Then drag off the “As your character” to set its variables.

To use a branch node based off a condition, drag off of any boolean value.