Teleporting after pressing a button

So! I’m making a side scroller game where your playable character teleports to a new place on the same level by pressing a button.
For example, when you’re on the 1st floor and you need to get to the 2nd floor, you come to the stairs and then the text “press “E” to go upstairs” appears. I managed to make an interactive button, but I have no idea how to make it teleport your character.

That’s the button blueprint

And that’s the level blueprint. I know I have to do something with this one, but what exactly?

Try something like this

http://i.imgur.com/QHufCZy.png

or this

http://i.imgur.com/Tt2qMd8.png

Thank you! I think I understand how it works, but how can I “combine” two buttons to interact with each other?
There are two buttons that are responsible for teleportong from one floor to another - button_2 and button_3

Hello, again!
You ask me for the answer about particular case but I think it will be better if you’ll read this documentation about Blueprints Communication

And read this little tutorial about Blueprints too

It seems like you are pretty new to all of this, so i would suggest a simple solution.
First of all, no need to do that branch for Trig. simply BeginOverlap should connect to what is currently connected to the branch’s True, and the EndOverlap to the branch’s False.
Now, for each button that suppose to teleport you to X location, do the following:

  1. Drag a Target Point to the location you wish to teleport player to when the button is pressed.
  2. In your Button actor, create a variable called “TargetLocation” of type “Target Point” and make sure its exposed.
  3. In the editor, click the Button actor and use the Eyedropper to pick the Target Point you wish to correspond to that button.
  4. To your event dispatcher (buttontrue) add a parameter called “TeleportTo” of type “Target Point”.
  5. In the level blueprint, drag a Get Player Character and do SetActorLocation from it. Then, connect buttontrue to that SetActorLocation and the location to set should be the Target Point’s location (the one coming out from buttontrue).

Thats it :slight_smile: each time the player presses the button, the button will tell level blueprint to teleport Player Character to it’s corresponding target point.

Hope this helps

This works perfectly! Thank you! You just saved my university project :smiley:

You are so very welcome. Good luck

This works only for 1 button in a level. I have multiple buttons that teleport to different locations but only works for the last added button. Please help.