Forum rules - please read before posting.

Password Menu

edited June 2014 in Technical Q&A
Hello,

I created a Computer Hotspot, which is used to turn on a ComputerScreen Menu, where the player is required to enter a password. The menu has "OK" button in it, that runs an ActionList, where the entered password gets set, then checked and then the menu is turned off. The problem is after the menu is turned off I can't control my player anymore, and the cursor is moving freely over the game screen. The game is in First Person mode.

What am I doing wrong?

Comments

  • The imminent 1.34 update addresses a number of menu and control-based issues.  Please wait and see if it fixes this problem.
  • edited June 2014
    Hi Chris,

    Unfortunately, the update didn't fix the problem. I guess it might be something to do with the way I trigger the Menu on. When I use "On Input Key", then everything is working, but when I use hotspost's interaction, then when I turn off the menu, looks like the game remains paused.

    EDITED:

    I used "Engine: Manage Systems" in my ActionList to re-enable cursor after the menu is turned off, now it works as I wanted. However, if the password is correct, a Cutscene should play to open a door, but when I put "Run Cutscene" at the end of my ActionList it doesn't work and the cutscene's name disappears from the ActionList after I test run my game. :(
  • Are you using an asset-based ActionList?  The Run Cutscene option won't work with that (I will put up a warning notice in the next update), since the asset needs to be able to find the Cutscene regardless of scene.

    Instead, add a ConstantID script to the Cutscene in question.  It will generate an ID number, which you can copy/paste into an Engine: Run ActionList Action on the asset file.
  • Thanks Chris, I'll try this. I am just using "Run Action List" in button's "Click type"; I'm not sure what kind of ActionList it is... I just created it in Project Tab and assigned to my menu button :) Also, is it the correct way to use "Engine: Manage Systems" to re-enable cursor after the menu is turned off? Are there better ways to achieve a "Password to open a door" thing?
  • If it works, it works!  That said, this tutorial covers similar steps.
  • Solved previous problem by putting Menu Turn off as the first action in the ActionList. One more question related to GUI. When I enter anything into the Input box it stays there. So for example after player entered a wrong password it stays there, and he or she has to manually delete it to enter another one. Is there a way to automatically clear Input box after player clicks "Check" button? Thanks!
  • A simple custom Action would be able to do this easily.  All you really need to do is run the following code:

    MenuInput inputBox = (MenuInput) PlayerMenus.GetElementWithName ("TheMenu", "TheInputBoxName");
    inputBox.label = "";


    Alternatively, if the box is linked to a Global Variable string, you should be able to just set the string as nothing to have the same effect.
  • Thank you Chris! Solved! There's one more thing I'd like to ask you about. I created a count down timer menu, which displays minutes and seconds left until the player dies. However, since those minutes and seconds are integer variables, after they get lower than 10 they're shown as one digit, e.g. 9,8,7,6 and so on. Is there a way to display them as 09, 08, 07, 06, etc so that it is still two digits?
  • No, I'm afraid not.  You'd have to be tricky and have a separate "0" label that appears in front of it if the value is less than 10.
  • edited October 2014
    Yep, after a bit of trial and error that worked... Thanks! Perhaps, it might be a useful feature to allow setting the quantity of digits to display for variables. Then the label element would display zeros when there's empty space in variable value. :)
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.