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"

Using event dispatchers or variables across multiple levels

Basically I have created a project where I have a main map as a "Transportation" hub and you travel to and from other maps from this map. However when the player returns from a level I need to create custom event so the player spawns close to the portal that he just came from rather than the centre of the map (main player start). I'm using a trigger volume and the "open level" function to jump between levels. I've tried using an event dispatcher to control the event on its return but the blueprint can't be called and I'm learning that level blueprints can not communicate with each other, i've also looked into using a variable but i'm still having the same problem. This is a VR project so the reason I haven't used level streaming is to keep up the FPS. If anyone could help that would be great!

Product Version: UE 4.15
Tags:
more ▼

asked May 12 '17 at 10:50 AM in Blueprint Scripting

avatar image

domridley_affari
33 5 8 11

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

1 answer: sort voted first

When you switch level entire world is cleared and all actors assign to it are automatically deleted and all data in them is lost, only pure UObjects that are not assign to world will be still alive. UE4 has designated class to store game-wide varables and code called UGameInstance

https://wiki.unrealengine.com/Game_Instance,_Custom_Game_Instance_For_Inter-Level_Persistent_Data_Storage

Can't find documentation that use blueprint but here is video tutorial using it in blueprint:

https://docs.unrealengine.com/latest/INT/Videos/PLZlv_N0_O1gYqSlbGQVKsRg6fpxWndZqZ/78XJYBfWXAA/

more ▼

answered May 21 '17 at 04:50 PM

avatar image

Shadowriver
37.8k 937 172 1123

(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