Forum rules - please read before posting.

Cutscene while moving, hide UI?

edited August 2018 in Technical Q&A
I might be missing something very obvious, but is there an option of hiding the UI whilst running "cutscene while moving"?

Usually with cutscenes, the interface is hidden, and in the case of some SCUMM games, if you take a long walk to a new scene edge, the verbs will hide since it's a cutscene, you can't interact anymore anyways. Is there an option to set this?

Comments

  • You can hook into the OnEnterGameState / OnExitGameState events to listen in for the game entering/exiting the Cutscene state, which occurs when the player moves to a Hotspot with that option checked.
  • @ChrisIceBox
    thanks! i managed to cobble this together with @Alverik 's kind help:

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using AC;

    public class CutsceneUiOff : MonoBehaviour {
        AC.Menu _menuVerbs;

        private void Start()
        {
            _menuVerbs = AC.PlayerMenus.GetMenuWithName("Verbs");
        }

        private void OnEnable()
        {
            EventManager.OnEnterGameState += EnterGameState;
            EventManager.OnEnterGameState += EnterGameState;
        }

        private void OnDisable()
        {
            EventManager.OnEnterGameState -= EnterGameState;
            EventManager.OnExitGameState -= EnterGameState;
        }

        private void EnterGameState(GameState gamestate)
        {
            if (gamestate == GameState.Cutscene)
            {
                _menuVerbs.TurnOff();
                _menuVerbs.isLocked = true;
            }
            else
            {
                 _menuVerbs.isLocked = false;
                 _menuVerbs.TurnOn();
            }
            
        }

    }

    For anyone else, just change _menuVerbs = AC.PlayerMenus.GetMenuWithName("Verbs"); to something descriptive and the UI name you need closing, respectively
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.