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"

Load map from file in-game

Greetings,

How can I load a map from a simple .umap file while in-game? I would like to do this as I plan to have the game load custom player-made levels later on (Perhaps through steam Workshop too)

Thanks in advance!

Edit: Sorry for the misunderstanding, what I mean by loading the map while in-game, is loading a map that has been placed in a folder AFTER the game has already been packaged, so that users can place their custom-built maps there to use in-game!

Product Version: Not Selected
Tags:
more ▼

asked Oct 20 '16 at 06:52 PM in Blueprint Scripting

avatar image

TornadoStorm
102 19 20 24

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

2 answers: sort voted first

You need to make sure that all your maps are placed inside of your Content folder, by default they should go into a Maps subfolder in your Content folder.

Here's a quick tutorial that shows loading levels from blueprints.

more ▼

answered Oct 21 '16 at 06:43 PM

avatar image

MajinSephiroth
1.2k 31 8 33

avatar image TornadoStorm Oct 21 '16 at 06:45 PM

Yes, but I meant from the packaged build. How can I load a map from a file that has been manually placed after the game has been packaged?

avatar image MajinSephiroth Oct 21 '16 at 07:05 PM

Packaged or not, the functionality will never change. If you have a node in your game that says "Open Level MyLevel" and it works fine in editor, it will work the same way in a packaged game.

The problem will be with the need to cook the map content and prepare it for deployment.

You can't cook on the fly, so, whoever created the map that will be added to the game needs to cook the content for distribution, you can't just copy the .umap over

avatar image TornadoStorm Oct 21 '16 at 07:09 PM

Ah! That makes life easier! So I must have all maps stored in a Content folder within the root directory, then everything else is managed? What about two levels of different filenames having the same name? Is there a way I can manage that?

avatar image MajinSephiroth Oct 21 '16 at 07:34 PM

The engine will get confused when ANY asset has the same name as a map. Make sure you provide an appropriate naming convention for your assets that way it won't attempt to load a widget called "MyLevel" instead of your map called "MyLevel".

Never have two assets with the same name, regardless what those types are. Widgets, actors, levels, sounds, etc.

avatar image TornadoStorm Oct 21 '16 at 07:37 PM

Ah alright. I'll depend on having users not name their map the same as another one, which will probably work as they won't want to have their map the same name as another anyway. Thanks for the help! I shall mark this answer as the accepted one. Appreciate it!

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

You can use Console Command blueprint and run the following command: open "YourMapName" (with out the .umap_ However, I don't think it's possible to do this as the maps will need to be cooked and indexed in your game. However you should try it anyways.

Good Luck!

more ▼

answered Oct 21 '16 at 01:56 AM

avatar image

Night Watcher
1.7k 44 12 71

avatar image TornadoStorm Oct 21 '16 at 07:40 PM

Hello! I just realized through the other guys answer where you were trying to get at. Your answer was actually correct, but I never knew maps must be in the content folder of the cooked game. Thanks for the help though! :D

avatar image Two-faced Nov 19 '16 at 07:20 AM

You can't cook on the fly, so, whoever created the map that will be added to the game needs to cook the content for distribution, you can't just copy the .umap over

So how does this work then? How do you call cooked map? With name?
avatar image TornadoStorm Nov 19 '16 at 07:45 AM

I was thinking perhaps that is related to the toolkits some UE4 games use to make maps, such as SQUAD and ARK. Since they have their own dedicated map making software, perhaps that's the only way? I would wish there could be some sort of in-game level editing or something

avatar image DisplaySweet Sep 13 '17 at 01:49 AM

Did you get any luck to call map/level from cooked game? I have same issue here, we need to make levels and call by command-line at run time. Not sure how to deal with it..

avatar image TornadoStorm Dec 02 '17 at 08:53 PM

I managed to use the 'Open Level' node with a file path to the .umap :)

(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