Forum rules - please read before posting.

Pausing game still runs the game

Hello Chris,
Hope you are well.

I came across the following problem, maybe it's bug, maybe not.

The pause system works (gameplay freezes). Then, inside the pause, I have the options menu (separate menu), which has the "pause game when enabled" checked out. When I'm in gameplay I want to have it "checked" and when I'm in the main menu, I don't want it. So I've added an AL at the beginning of the options Menu to check the previous scene (if it's the Main Menu, then don't pause anything). It doesn't work when checking with the previous scene. It's always telling me that the space is blank. Yes, I've correctly written it and yes, it's added in built settings.

Maybe there's another way to have some menus "unpaused" even via script. The pause system works great but some scenes don't require it: for example during the main menu when it enters, it pauses the music.

AC v1.74.5
Unity 2020.3.27

Proof: https://imgur.com/a/hLtaHzz

Thanks a lot.

Comments

  • edited February 2022

    The Engine: Manage systems Action won't affect whether or not a given menu pauses the game or not.

    If you want to control the Menu's "Pause game when enabled?" property at runtime, you can control it through script. As with any Manager field, right-click the field's label to get an API reference that you can copy/paste into a script function, which can then be called with the Object: Call event Action.

    Another approach to this problem is to have a separate "Freeze game" Menu that handles the pause state separately, as outlined in this tutorial.

    As an aside: it's possible to play music while the game is paused if you open up the Music Storage window and check Can play when game is paused?.

  • Thanks a lot! I made it work with "freeze" menu. Thanks!!! Case closed

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.