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"

Getting a Character from one Level to Another?

I'm trying to figure out how to get my character to my second level after touching a basic object but I can't figure out how to do the blueprints.

In the level you walk for a little bit before touching a cone to get to the next level. Help please?

Product Version: UE 4.10
more ▼

asked Mar 18 '16 at 10:43 PM in Blueprint Scripting

avatar image

1 1 1

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

1 answer: sort voted first

If you are talking about just going to a different map there is the open level node. This would open that map, that should have a game mode with your same character pawn as default, so it can spawn it.

alt text

I would use this node with an actor blueprint that had a sphere collider component that triggers the beginOverlapEvent.

alt text

If you are talking about "saving your character" and spawning it again in the new map, with some stats and variables you wanna save, then you should probably make a custom struct to save your data and pass it to the game instance class, and then restore the state of your character from there.

If you are new to Unreal or to game development in general you should be able to find, tutorials for your question, with a much more detailed explanation than my quick response.

Hope this helps :P

openlevel.png (13.9 kB)
actorblueprint.png (237.2 kB)
more ▼

answered Mar 18 '16 at 11:26 PM

avatar image

620 17 10 34

avatar image JeromeParent Mar 20 '16 at 07:01 PM

MacDx is correct but I just want to expand a bit more on the answer to help you understand how Unreal works.

When you "travel" from a level to another (by loading a new map/using the Open Level node), every actor and blueprint that is currently running is destroyed, along with whatever changes you had made to them or their variables during the previous level. When the new level is opened, the Game Mode is re-created, and in turn creates all the other default blueprints like your character, player controller, etc, all with their default settings.

The only blueprint that is not destroyed when opening a new level is the Game Instance one. There can only ever be one Game Instance at a time, and it's created when you start playing, and is destroyed when you close the game.

(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