Forum rules - please read before posting.

Press Any key to conitue

Hi everyone,

I was wondering if some of you know how to create a switch menu on input.anykey, I tried using PlayMaker but for some odd reason, the global variables do not want to sync with each other. Then I tried setting the variable via script but for some reason that does not want to work and finally tried to create a custom action but that does not seem to work as well.

PS: I did try to create an input in the input manager of AC but no luck
PS 2: I am using AC v1.73.2 and Unity 2019.4.19f1

Comments

  • I created a simple menu that says press any key to continue and then it must switch to my main menu. Forgot this part.

  • You shouldn't have to rely on variables for this - but AC menus can only listen for inputs explicitly defined in Unity's Input Manager.

    To react to presses of Input.anyKey, you can make use of a custom script. If such an input is detected, you can then have it run an ActionList asset that e.g. checks if the "prompt" menu is open (Menu: Check state), and then turns on the main menu (Menu: Change state).

    using UnityEngine;
    
    public class AnyKeyExample : MonoBehaviour
    {
    
        public AC.ActionListAsset assetToRun;
    
        public void Update ()
        {
            if (Input.anyKey)
            {
                assetToRun.Interact ();
            }
        }
    
    
    }
    
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.