Forum rules - please read before posting.

Resetting a Menu Input Value

Hey Chris,
I was putting together a very simple password screen where you're prompted with typing a password in an input field (the same as the Player Name tutorial) and I was curious if there is a simple way to reset the input value to empty when the player submits the wrong answer? For now, whenever they submit, it comes back with the same wrong answer as before.
All the best,
Josh

Comments

  • This code would do it:

    AC.MenuInput inputBox = (AC.MenuInput) AC.PlayerMenus.GetElementWithName ("InputBoxMenu", "InputBoxElement");
    inputBox.label = "Reset text";

    Just replace the menu/element names with your own, bung it in a custom Action, and you'll be good to use it in your ActionList.
  • Awesome! Worked perfectly, and I'll post the action on the "Extending the editor" for anyone else who might be interested.
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.