Hello, so I have been wrapping my head around this for hours now and I could not find a solution.
I have three main areas and I’m trying to teleport the player between them. I’ll attach a screenshot so you can better understand what I’m trying to do. The problem however, is that it only goes into negative values.
I simply want the player to teleport into Area 1 once he presses 1, into Area 2 after pressing 2 etc. I also want him to be able to teleport back into Area 1 after pressing 1, no matter if he is in Area 2 or 3. I don’t want pre-defined teleport locations either, and would like to only change Y axis. Thanks in advance.
Yes, that would be the easiest solution but I pretty much want to keep actors location and rotation as it is. To better understand what I’m trying to do, here is a video: https://youtu.be/MWxtk197yYw?t=648
I could use flip flop and it would work perfectly, however I need to be able to switch between 3 areas, not 2. I also want player to be able to teleport to whatever area he wants by pressing 1,2,3 no matter where he is. I also don’t think this could be done with a loop (might be wrong tho).
You know, I novice to blueprints so I don’t even know if this is possible, but I have decided to ask anyway.
If you want to do it in a general sense, from anywhere, then have an array of locations, and choose the next based on the platform index. You don’t need to type them in, just use a target point and ‘get all actors of class’
you can also have a pawn in each area and the button possesses the pawn in that area
then when you swap between you will always be in the last pawn position for that area.
its also simple possession.
Do you want teleport the platforms or the player? Because in that video, it looks like they teleport/move the platforms, not the player o.o
And if you want teleport the player, do you mean by that, that he should teleport into a relative position into the new target area from which he started at the old area?
Say he starts in platform A in sector f.e. B4 (to use the batttleship grid), that you also land in sector b4 in your target platform (maybe just height adjusted to not slam into something)?
If yes, you probably just need to get the platforms location and your position within that platform (is it the difference between player position and platform position?), then just get the position of your target platform and add your required offset to it, to land in the same sector from which you started.
Yes, thanks to ClockworkOcean, the BP is already working as intended.
The idea of teleporting the platforms (or swapping between streamed volumes) did not even came to my mind but it sounds way better.
I know I may ask for much but would it be possible to provide a bp so I can see how can it be done? Would greatly appreciate it. Thank you in advance.
Yeah, i was wrong about that part, since i didn´t notice during the first watches of that video, that not only the position of the platforms change, but the rest of the level/world too, so the player there indeed jumps between two different versions of that level - or ingame the same level just from different times, since that part is called “time warp mission” ^.^
At first glance It just looked like he teleported the platforms, because they just appeared in different slots of those otherwise empty metal frames.
But if you want teleport the platforms, then this should be not so much different from your current version, just connected to one of the platforms (i think, the engine does not care, if it moves a player or a platform/mesh to a new position). You just have to make sure, that that there is no platform already in that target position, and you then have to decide, which platform you move, if there is more than one available.
I have just used your version of simply loading and unloading levels since it provides more opportunities and seems more dynamic. Players position stays the same and I can swap between levels via 1,2,3 keys as I originally intended. Don’t know why I have not thought about this earlier.