Teleport after pressing HUD Button

Hello everybody.
I apologize but I’m still not very experienced with Blueprint Scripting.
I am working on a game in which I would like to activate the teleportation function following a button pressed in the hud. My problem concerns the communication between HUD and Character blueprints.
If someone has a solution to my problem or can tell me a youtube tutorial i will be very pleased.

1 Like

Hey there, on your widget do the following:

  • Create a variable called Player and set it to the type of your character
  • On event construct do Get Owning Player Pawn, cast it to the type of your character and save that to the Player variable
  • On the mouse clicked event you get the Player variable and do with him what you want (call a function, use Set Actor Location to teleport, etc)

It is similar to this image:

you can add the functionality for the teleport either in the widget or just have the widget call a function that executes within the player BP