x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How do you change level?

I've been having some trouble. I know the basic way of changing the level but what if I want there to be more then one entrance like a cave or a huge open world and want the player to spawn outside of the house or cave's entrance? I tried the teleport command in the Blueprint but it just keeps taking me to location '0.0.0' anyways. Is there a way to make it to where the player will spawn at a certain actor or just a certain location on that level?

Product Version: UE 4.8
Tags:
more ▼

asked Sep 09 '15 at 05:45 PM in Using UE4

avatar image

TheEmeraldRose
3 2 3 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Use the player start actor from the basic components list to the left of the viewport where you want your player to spawn.

You can create as many as you want and create an array of them and then do random or specified or just one.

Hope this helps Don't forget to accept an answer that best clears your question up or answers it so when the community finds your question in the future via search/google they know exactly what you did to fix it/get it going.

more ▼

answered Sep 09 '15 at 05:58 PM

avatar image

Nsomnia
1.8k 67 27 137

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Let's say you have one "entrance door" and one "cave entrance" that both go between the same two levels, and you want travel back and forth to go to the "right" place on the other side, then there are a few things to do: 1) You need to create player state markers at each of the entrances. This is what Nsomnia suggests. Name each of these start points after the location -- "door" or "cave" for example. 2) You need to create a trigger volume for loading the other level at each place. Name these triggers after the location as well using the corresponding names ("door" and "cave" here.) 3) You need to "somehow" forward the state of where the player is supposed to show up. The easiest way is to stuff the "name of the spawn point" into a custom GameState when you hit the trigger. When a level loads, it looks up the name of the spawn point in this variable in the GameState, and spawns the player there.

So:

  1. Player hits trigger volume named "cave"

  2. Trigger volume stuffs its name ("cave") into a variable in your Game State

  3. Trigger volume loads the next level/map

  4. Inside game mode, in begin play / spawn player, the game mode takes the name out of the Game State

  5. Find a player spawn point with the same name as the given name, and spawn the player there

more ▼

answered Sep 09 '15 at 08:29 PM

avatar image

jwatte
1.3k 48 41 88

avatar image TheEmeraldRose Sep 20 '15 at 04:05 PM

I'm sorry but, can you send a picture of an example?

avatar image jwatte Sep 20 '15 at 07:06 PM

Level Setup:

Level Setup

Game Mode Choose Player Start Override:

Choose Player Start Override

Create a custom Game State

custom Game State

Add Spawn Name to Game State:

Spawn Name to Game State

Trigger Box sets Desired Spawn Point Name

Desired Spawn Point Name

Finally, don't forget to set your game state class as the game state type in the project settings.

avatar image TheEmeraldRose Sep 22 '15 at 12:28 PM

I did everything you showed and still the game just puts me at a random spawn point. what am I doing wrong?

avatar image kmaster30 Nov 16 '16 at 08:02 PM

Has there been any updates to this cause i cant get this to work for me

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question