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"

Wait for open level? Spawned pawn vanishes...

I want to handle spawning player controlled character by myself because there are different ones based on selection in main menu, each with different capabilities and control mechanism. From the main menu I am triggering event on my PlayerController which spawns correct character and possesses it. This alone works greatly and no problem there.

However I also need to load actual game level and that's where things get bad. Spawned character is removed once level loads. I tried calling OpenLevel before and after Spawn, but no effect. I would like to avoid adding some sort of delays there, that's totally nasty.

Only solution I found is from within my level blueprint to dispatch event on PlayerController to let it know it's ready, but that's rather inconvenient as I need to pass some other options from the main menu toward the PlayerController.

What could be other way to solve this, please?

Product Version: UE 4.14
more ▼

asked Dec 14 '16 at 01:19 PM in Blueprint Scripting

avatar image

Daniel K.
165 9 21 23

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

1 answer: sort voted first


as for the other post:

If I understand the problem then you could store the information which player you want to spawn within the game instance. In the Level blueprint you can then access this information and spawn your specific player.

Haven't tried it but I think this is the way I would try it.

Kind Regards


more ▼

answered Dec 14 '16 at 02:49 PM

avatar image

248 10 8 19

avatar image Daniel K. Dec 14 '16 at 03:32 PM

I kinda wanted to avoid level blueprint logic as it's kinda closed box and it cannot be shared with other levels. More likely I will store that information within GameState before calling Open Level and Controller can read it from there later. Thanks for confirmation.

(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