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"

Expose on Spawn - available for levels?

Hello friends,

a few fellow programmers and me are in the process of creating a mostly procedurally generated cross-platform game. Our basic architecture has a persistent level/world, which consists of several sublevels, which in turn consist of rooms that are divided into tiles. All procedural generation is (or rather, we would like to have it) handled/called in blueprint construction scripts. Now, we plan to use precisely one seeded random stream in order to have reproducable worlds, and what's basically missing is some way to pass a reference to the random stream between the persistent level and the corresponding sublevels. As our rooms are modelled through actors, we can use the "Expose on Spawn" feature on SpawnActor calls for referencing between levels and rooms, however, i have not been able to find such a feature for levels. Question 1: Can this be done through blueprints, and if so, how should i go about it?

We do have a workaround in place which leaves the construction script unused and has a manual 'init' call after a reference has been set, however, i feel like there has to be some other way to accomplish that if only for consistency reasons.

On a related note, we have randomly placed entrances and exits for each level, and need to access those locations from other level blueprints in order to ensure connectivity. Question 2, once again: How would i go about this? Gamestate seems possible, but feels wrong..

Help is much appreciated, thanks!

Product Version: Not Selected
Tags:
more ▼

asked May 07 '15 at 08:21 PM in Blueprint Scripting

avatar image

baroquez
16 1 2 3

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

1 answer: sort voted first

Hi baroquez,

It sounds to me like what would be most useful to you is savegame objects. Using savegame object blueprints, you can pass information between levels without losing the data during loading/unloading. You can find that here:

https://docs.unrealengine.com/latest/INT/Gameplay/SaveGame/Blueprints/index.html

If all of the information is going to be streamed in, you should be able to access any info streamed once it opens, if you have information that is being unloaded at the same time, you should be able to use the save state to pass any values/information you need to keep track of into the next level, then when that level is streamed back in you can simply pass that information back.

If you plan on keeping the persistent level throughout and simply loading and unloading streamed content, creating a Game Instance blueprint and saving the information in there should serve the same general purpose, it depends on what specifically you are looking for.

more ▼

answered Dec 17 '15 at 09:33 PM

(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