Announcement

Collapse
No announcement yet.

Teleport to Specific Location within Another Level

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Hi HavocX, Thorax and Raildex,

    I have the same issue, can you please elaborate a little bit more about your configurations? I created an archviz project with a lobby level and an apartment level connected by a trigger and widget menu inside the elevator and I want to change the player initial start to the elevator point when the player come back to the lobby from the apartment.


    Thanks!

    Leave a comment:


  • replied
    Hi there.

    I use The OptionsString to teleport to a specific Location.
    I have a custom Trigger with a number. This Number is put into the Options String (in the Open Level node).

    in My GameMode, the PlayerStart is searched according to this number and used as Spawn point then.

    Leave a comment:


  • replied
    I ended up using tags on the two player starts. Stored a value equal to the tags which was modified by using one of the portals.
    I then override the choose player start in the game mode to select the spawn points based on their tag.

    Thanks to Daekesh for the help.

    Leave a comment:


  • replied
    I've successfully done it the way CoquiGames suggested. And you shouldn't need the cast or offset (as long as the spawn point do not have a mesh).

    To make it even nicer, put the logic on the spawn point actor instead of in the level blueprint. You can then extend it to handle multiple spawn points and have only one trigger depending on game persistent info. I have made a system just like that and it worked great!

    Leave a comment:


  • replied
    Originally posted by Thorax View Post
    The suggestion by Pavomba doesnt work. It would make the player always start at that location every time he enters that level.

    I want the player to start at a "Player Start" actor the first time he enters that map. And when he enters that map via activating a portal, he doesnt get teleported to that player start, but an entirely separate location within the map.

    And again, the second method you mentioned, just teleports you to that location in the current map, then teleports you to the next map at the player start.

    Strange, I'll try to upload the files later, but did you delete your player start in favor of the pawn being the player 0 in details? if not, it might be the reason, the Player start might be hampering that.

    EDIT: here http://www.4shared.com/rar/aszw9Jtec...port_Test.html

    It's a 4.14 project
    Last edited by Pavomba; 01-21-2017, 11:00 PM.

    Leave a comment:


  • replied
    The suggestion by Pavomba doesnt work. It would make the player always start at that location every time he enters that level.

    I want the player to start at a "Player Start" actor the first time he enters that map. And when he enters that map via activating a portal, he doesnt get teleported to that player start, but an entirely separate location within the map.

    And again, the second method you mentioned, just teleports you to that location in the current map, then teleports you to the next map at the player start.

    Leave a comment:


  • replied
    [MENTION=49600]CoquiGames[/MENTION], you don't even need to consider a spawn point, if you set your player pawn in Details tab to be the player 0, then it will becomes your PlayerStart when you place it in the level.

    But your solution is good too as you avoid to create a variable, if you have a fixed position, then just using the Vector+Vector or just split the structure in New Location might be useful, if it was something that could be in any position, then a variable would be better to store the position from the map and send it to the New Location.

    Leave a comment:


  • replied
    Originally posted by Thorax View Post
    Hi all. Just trying to do something simple but I can't figure it out.

    I can teleport my player to another level using the "Open Level" node. But that teleports the player to a "player start" actor.
    I can also teleport the player to any given location in the current level.

    But I can't for the life of me figure out how to do both. To teleport the player to a specific location within a different level.


    Any ideas???

    It doesn't need to be anything complex. It will always be the same location so it can be set directly in a transform. Something like this http://i.imgur.com/0LgOGnH.png

    Cheers all. Any pointers are very much appreciated.

    Hi Thorax,

    There are a few ways of doing this. [MENTION=29120]Pavomba[/MENTION] gave you the easiest solution:

    You are on Level1. You want to open Level2 and then teleport the player to a specific location.

    Steps:
    1. Create an actor on Level2 that will be used as the spawn point
    2. Open Level Blueprint of Level2 and create this:

    Click image for larger version

Name:	Teleport.jpg
Views:	1
Size:	184.7 KB
ID:	1121856

    3. Now on Level1 use the OpenLevel node to go to Level2.

    You should now load Level2 and immediate be transported to the Spawnpoint mesh.


    "PlayerCharacter" is the name of my Character Blueprint (yours might be ThirdPersonCharacter). The offset inside the red square is so your character doesnt get stuck inside the SpawnPoint mesh (play around with the Z value).

    Hope this helps!
    Last edited by CoquiGames; 01-20-2017, 10:44 PM.

    Leave a comment:


  • replied
    Originally posted by Thorax View Post
    I don't have trouble getting info persisting between levels. But actually being able to use the value of a stored vector in a level switch is what I can't do.

    Tried it the way you mentioned already and that doesn't work. It just moves you to that location in the current map, then opens the referenced map at the default start location

    Strange, I've used the ThirdPerson Player from the Loading tutorial from Epic.

    The Stream_Character BP is the name of the Player BP, did you try to do that? the New_Var_0 stores the Dest Localtion that i've typed in Details, and in the Level BP it will executo the Teleport function with the variable connected.

    Bear in mind that is a very rough concept of how it would work.

    Leave a comment:


  • replied
    maybe in controller? or gameinstance?

    Leave a comment:


  • replied
    Where? Its own BP? Level BP?

    Leave a comment:


  • replied
    Hi, Thorax
    Try this
    1. open level
    2. set actor location

    Leave a comment:


  • replied
    I don't have trouble getting info persisting between levels. But actually being able to use the value of a stored vector in a level switch is what I can't do.

    Tried it the way you mentioned already and that doesn't work. It just moves you to that location in the current map, then opens the referenced map at the default start location

    Leave a comment:


  • replied
    Opening another level will cause it to go to the player start/Player 0, because it won't bring info from the previous level (Ex: if you have 25% of Health, it will be full on the next level).

    I think you are trying to do something similar to Borderlands fast travel, (EX: From Fast Travel 2 from Fyrestone, to Fast Travel 4 in Gully Skag) but instead of 2-3 teleporters in fixed places, the player can teleport anywhere he wishes on the level.


    Well, in that case, I think it there would have a connection between those levels, where the info you stated in the first level goes to the second, but since i'm kinda new too, I can't help too much, but:

    1) I think it would be necessary to create a variable to store where the player desires to teleport, and then at the next level BP, use an Event Tick/Begin Play > Teleport with the connected variables into the node, that requires you to cast or reference the BP where the variable is in order to get it properly.

    2) You could make a large collider BP and use the method above with it, instead of the level BP.

    EDIT: Check the images

    Click image for larger version

Name:	UMGTeleport1.png
Views:	1
Size:	217.7 KB
ID:	1121772

    Click image for larger version

Name:	UMGTeleport2.png
Views:	1
Size:	210.9 KB
ID:	1121773
    Last edited by Pavomba; 01-19-2017, 11:46 PM.

    Leave a comment:


  • started a topic Teleport to Specific Location within Another Level

    Teleport to Specific Location within Another Level

    Hi all. Just trying to do something simple but I can't figure it out.

    I can teleport my player to another level using the "Open Level" node. But that teleports the player to a "player start" actor.
    I can also teleport the player to any given location in the current level.

    But I can't for the life of me figure out how to do both. To teleport the player to a specific location within a different level.


    Any ideas???

    It doesn't need to be anything complex. It will always be the same location so it can be set directly in a transform. Something like this http://i.imgur.com/0LgOGnH.png

    Cheers all. Any pointers are very much appreciated.
Working...
X