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"

player won't move after re-opening level

Hi,

My app opens with a main menu, there you can start the game. Everything runs smoothly, I use the "Open Level" node.

But when i go back to the main menu, and the load the level again, the player won't move.

Any ideas what the issue could be?

Thanks!

Product Version: UE 4.15
Tags:
more ▼

asked Jun 05 '17 at 01:26 PM in Blueprint Scripting

avatar image

nermin_91
8 1 2 4

avatar image Irakli Jun 05 '17 at 01:44 PM

Can you screenshot graphs where you spawn/possess player, open level and etc? Its hard to spot a bug when there is nothing to look at.

avatar image nermin_91 Jun 05 '17 at 02:50 PM

Of course! Sorry about that.

Loading my level on buttonpress from my main menu widget: alt text

Loading my menu-level on buttonpress from my pause menu widget alt text

one.jpg (256.2 kB)
two.jpg (201.8 kB)
avatar image Irakli Jun 05 '17 at 03:03 PM

how do you possess the controlled character, do you do that from PlayerStart or some other manual way?

avatar image Irakli Jun 05 '17 at 03:09 PM

Try this: call "set input mode game only" in your Huset level blueprint Event Begin Play and call "set input mode UI only" in MainMenu's level blueprint Event Begin Play. I have had problems before where some nodes would not execute after Open Level node, mostly because Open Level would cause objects that these nodes where called from to disappear. The fact that you character is not moving may be due to the fact that Input mode does not get called.

avatar image nermin_91 Jun 05 '17 at 03:19 PM

Unfortunately it didn't work - neither did "Set Input Mode Game And UI".

Could i be that I have these commands in my levels blueprint? I guess it gets loaded each time i open the level: alt text

three.jpg (213.1 kB)
avatar image Irakli Jun 05 '17 at 03:25 PM

None of these should influence player control. The reason we should be after is why it works the first time but doesn't work the second time after you go back to menu. Is there anything you might be doing in BeginPlay of levels, Game Instance or PlayerController that decides what you are possessing or unpossessing. For example if you are saving number of lives or HP in game instance and you set it to 0 the first time you play it might break something the next time you try to open the level because you didnt reset number of lives or hp. Any logic like that?

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

2 answers: sort voted first

Try this: call "set input mode game only" in your Huset level blueprint Event Begin Play and call "set input mode UI only" in MainMenu's level blueprint Event Begin Play. I have had problems before where some nodes would not execute after Open Level node, mostly because Open Level would cause objects that these nodes where called from to disappear. The fact that you character is not moving may be due to the fact that Input mode does not get called.

more ▼

answered Jun 05 '17 at 03:30 PM

avatar image

Irakli
458 15 6 25

avatar image FareedMasood May 18 '18 at 07:39 AM

This works !! Thank you !

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

It DID work! I misunderstood you, I had to put "set input"-node before i open the level...

Thank you for help. It is greatly appreciated!

more ▼

answered Jun 05 '17 at 03:23 PM

avatar image

nermin_91
8 1 2 4

avatar image Irakli Jun 05 '17 at 03:31 PM

moved my comment to answer, please accept if it helped, thanks

(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