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"

how to disable Pause menu inside the main menu?

Hello guys! I know it very simple but I really stuck here, I have an issue in the main menu, when I click the paused key inside the main menu level the paused menu still appear, I just want that to appear inside the game level. Can you suggest a solution for that please :\ ?? alt text

Product Version: UE 4.18
Tags:
more ▼

asked Dec 28 '17 at 05:34 PM in Blueprint Scripting

avatar image

saiffa
10 2 5 6

avatar image saiffa Dec 29 '17 at 11:01 AM

okay, guys here is my pause key blueprint, I just want the pause HUd to appear only on the game level, not main menu, so I want to disable this key (paused) on the main menu?

any brilliant guy around here can solve this issue :) ??

alt text

01.jpg (164.0 kB)
avatar image saiffa Dec 29 '17 at 12:52 PM

any answer :) ??

avatar image saiffa Dec 30 '17 at 08:41 PM

sound very complicated :( any new suggestions??

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

2 answers: sort voted first

Just create a boolean variable to check if you can use pause menu at this moment : "bPauseAvailable?" default True. Add branch node to your PauseMenu event and check this variable. (true -> create widget / false -> nothing) Set your boolean variable to False in your MainMenu event. Set your boolean variable to True when you remove your MainMenu.

more ▼

answered Dec 31 '17 at 02:44 AM

avatar image

martoof
132 9 13 18

avatar image saiffa Dec 31 '17 at 10:30 AM

I created the first part, but how can I do this: Set your boolean variable to False in your MainMenu event. Set your boolean variable to True when you remove your MainMenu.

avatar image saiffa Dec 31 '17 at 11:12 AM

could you show me how :D ?

avatar image martoof Dec 31 '17 at 02:57 PM

Like I previously said : Pause menu

You can also make the bool value directly inside your widget, like you want ;)

avatar image saiffa Dec 31 '17 at 03:33 PM

I appreciate your suggestion :), but the thing is my main menu events on another level not inside player BP :\ see attached image alt text

011.jpg (227.7 kB)
avatar image martoof Dec 31 '17 at 03:36 PM

That is not a problem, it's the same logic, just cast your bool variable between your two BP. Look and learn how to communicate between blueprints. https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/BlueprintCommsUsage/

avatar image saiffa Dec 31 '17 at 04:28 PM

I tried to cast it but the hud disappeared, leed me please I think I'm up to something XD

alt text

02.jpg (227.7 kB)
avatar image saiffa Dec 31 '17 at 05:35 PM

alt text Im stuck here :\

033.jpg (256.0 kB)
avatar image martoof Dec 31 '17 at 06:02 PM

Your cast failed because you tried to cast a controller to a character. Use a get player character instead ;) and it seems to be good !

avatar image saiffa Dec 31 '17 at 06:22 PM

It works! :D I appreciate it Martoof! Cheers,

avatar image martoof Dec 31 '17 at 07:52 PM

You are welcome, don't hesitate to train with BP communication !!

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

There are two ways I would use:

  1. Use a state. Declare states for main menu and in-game and then just check the state variable when pressing pause key to show or not show the menu

  2. Use a different Pawn when Player is in Main Menu, so this logic does not work. You can then implement other features such as special movement inside main menu (we had moving around a planet by swiping) and switch to your HorrorCharacter when starting (e.g. by loading another map which has that HorrorCharacter set by the default gamemode)

more ▼

answered Dec 29 '17 at 01:55 PM

avatar image

birdfreeyahoo
870 46 44 80

avatar image saiffa Dec 29 '17 at 02:59 PM

thanks for the reply, how can use the state option what command should I add, please see my blueprint above

avatar image birdfreeyahoo Dec 29 '17 at 03:52 PM

Well first you create an Enumeration in the editor. The Enumeration contains all states that make sense in your game like MainMenu, InGame etc. Then put a variable of the type of this Enum somewhere it makes sense, I recommend the GameMode if building a Singleplayer game (keep in mind that there already exists a state with PostLogin, Playing etc., maybe you could use that). When you start you set that state to MainMenu, when the player starts a game you set it to InGame etc. Now when it is time to show the pause menu you simply check for the current state and show the Pause Menu depending on that.

avatar image saiffa Dec 29 '17 at 04:33 PM

thanks alot birdfree :) I will try to create this Enumeration tonight

(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