I’m trying to create a linear path of teleport locations that the player can teleport between.
So when the player presses “A”, they move to “Location 1”. If they press “A” again, they move to “Location 2”. If they press “A” again, they move to “Location 3”, etc etc.
If they press “B” at any time, they will move to the previous Location. (E.g. If the player had previously teleported to Location 2, they will now be teleported to Location 1.
I guess it would be a case of setting up an array of locations and cycling through an index. Just a bit stuck on getting it working!
Thank you for such a quick response! Really appreciate it.
I’ve had a play around but I still can’t quite get it all to work. (Most likely me being inexperienced and misunderstanding)
Using your blueprint above, I was able to teleport to the first location, but not beyond.
I created a BP Actor, duplicated it a few times and placed them in the locations I want the player to be teleported to.
Here is what I tried previously, maybe you would be able to expand on that? Or if possible, perhaps explain the above in a little more of an idiot-friendly way just in case I missed something
Just to reiterate again - I am looking to Teleport between set locations (as marked by my BP Actors), in a chronological order (with “A” as an input). I would also like the ability to Teleport back to the previous location (With “B” as an input)
So I believe I am just looking at some way for the game to track the index of the Teleport Points, +1 when I Teleport to the next location, -1 when I Teleport to the previous location, and Teleport me accordingly.
Please let me know if I’m way off the mark! Thanks so much
Amazingly, moving the BP Actors above the ground slightly has fixed it - lol!! It now works perfectly!
Thank you so much!
For Teleporting to the previous location with “B”, I thought it may have been as simple as swapping out the Increment Integer with a Detrement Integer and linking that to the B Input but it seems to have no pattern at all to the Teleporting - if you could share your solution to that then I will be so grateful!
Incidentally ( I’m anticipating the next question… ), if you want to know how to make the teleports happen in a certain order, you can give the locaton BPs IDs
I am trying to piece together several of your posts in several discussions I am a noob but your clues are helpful even though I can’t quite get this to work. Ultimately, I want the ordered location teleport… I am stuck how you get the ID variable in the array element (blue) to match the array index (green) - I now it’s due to my lack of UE5 understanding!
I did try get the original (unordered) version to work, but I think I haven’t constucted my variables correctly - a vector array wouldnt suffice - do I need a stuct with two arrays for location and rotation?
You have been so helpful and you pop up everytime I search for a teleport setup!
I think my biggest sticking point is accessing variables from BPs - I did mean the part you highlighted
I created a TargetPoint BP class, created a integer variable in it called ‘ID’ and set it as public. I could create copies of these TargetPoint BPs and just edited the ID variable (int). I think my trouble is now trying to reference that variable from my BP_FirstPersonCharacter (I’m using the level example from UE5.2.1 - FirstPerson).
I’ve seen videos where people can highlight the BP in the content browser, or scene and then reference that in the blueprint editor, even from another BP. It’s probably something simple but I am a noob and still learning (believe me, it took me a while to get the actor class set - it was only when I went to TargetPosition class did things start improving!)
Also, this is a solved thread and I should probably start a new topic - sorry!
I am using “get all actors of class” and I can output a forEach loop with each location, rotation, name but it’s the ID variable in each targetpoint instance I’m struggling to reference.
Your posts have been hugely helpful, I’m just clearly needing to learn a lot more than I already know!
I noticed you’re talking about making a target point BP class, whereas I called it ‘teleport location’. Of course this doesn’t matter, but I think your problem maybe that you’re doing this
I have tried “ID”, “teleportpoint”, and everything I can think of!
I really appreciate your time and help with this - as people have often said, you certainly deserve that hero title! In reality, I could explicitly define a small number of locations and rotations manually for my use case - I am interested in this because it makes more sense using your approach.
You are a hero! Thank you so much for helping me out with this! I have it working! You helped me in so many ways and my journey of learning and creativity can continue!
This has been giving me headaches for days - you’ve made me very happy now!