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 I use a level blueprint on another level of the same project?

I don't know how to do this and I certainly do not want to rewrite my level blueprint for every level of my game. Why doesn't a global blueprint exist? Some games require the same tasks like a day-night-cycle over and over again in every level.

Product Version: Not Selected
Tags:
more ▼

asked Sep 22 '14 at 06:29 PM in Blueprint Scripting

avatar image

Matrix760
1 1 2 2

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

3 answers: sort voted first

You should have a persistent level and have everything you want to use in every level(like the sun and day&night system) in that persistent level.

more ▼

answered Sep 22 '14 at 06:32 PM

avatar image

Jacky
16.9k 671 167 678

avatar image Matrix760 Sep 22 '14 at 09:35 PM

My level is persistent. How do I use my level blueprint in the other levels that I imported without starting a second instance of the UE4 editor and copy pasting everything?

avatar image Jacky Sep 22 '14 at 09:39 PM

Persistent level will be loaded at all times(because it is persistent!) and anything that happens in it's level BP will affect all of the levels. So you dont need to copy&paste and transfer anything from it to your sub-levels.

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

If you want something reusable, create standard blueprint, level blueprint is just for that specific level scripting. Level blueprint it self is not different from other blueprint, only difference is that it's saved inside umap and you can place object references a lot easier (since system is sure those objects and level blueprint will exist on level at the same time for sure, which is not the case with other blueprints and runtime spawned object). By knowing that fact, create new blueprint that the same as you would make level blueprint, if your blueprint is not physical, use billboard component as root component thats what this component was made for. And there you go you got piece of blueprint you can place on level and reuse it anywhere.

more ▼

answered Sep 22 '14 at 10:04 PM

avatar image

Shadowriver
37.8k 937 172 1123

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

What you may have to do, for instance if you're thinking of something like Skyrim and you want entirely different levels, loading screens and whatnot, is save a few values. Like with your day/night cycle, whenever you open a level, like an interaction with a door opening an entirely new level, you have to run a function to save the values, like your sun height and your time of day if you have that, or a day of the week if you have that. Once you begin playing that new level you should load the save file that you use, and if you have a function previously set up not in the level blueprint, just a blueprint for your day/night cycle, include a section for it to read the save file and replace certain values, again like your sun height, and then set its current sun height. That will make it so that whatever level uses your day/night cycle blueprint will have to read the file once you begin playing, and then save back to that file one you're switching levels. It also makes it fairly easy if you're going to have a big save game function and need to save your location and plenty of information like quests, so every time you load into a save game the values aren't reset to the base values in your coding.

more ▼

answered Sep 22 '14 at 11:53 PM

avatar image

Jägermanjensen
116 5 5 13

(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