Need a little help on gamebook's get input

I'm planning to have this scene in a gamebook where players have to type in their names, but I'm not sure how especially with the absence of an input box in gamebook mode. Is there an alternative to do this or a way to add that input box? Thanks in advance


Hello :)

Good news is that there is an input box in the Gamebook mode, and even in the editor (which I use as I know didly squatt about programming and coding :D).

IF YOU ARE USING THE EDITOR:

  1. Set page to Script (or script + text if you need it) and in the scripting options choose: Output > Get input.
  2. Then add (into this script) Variables > Set a variable or attribute
  3. In Set variable box type player.alias or player.name or whatever you want to call it
  4. After the = sign set from dropdown menu expression and in the third box (do not use dropdown button) just type result
  5. BONUS: If you want the player to see their name/input displayed, select as a next step Print a message and type something like: "So you are called player.name, right?"

IF YOU USE CODE

      <inherit name="script" />
      <script type="script">
        msg ("Confirm your name, soldier.")
        GetInput() {
          player.alias = result
          msg ("Thank you, " + player.alias)```

Holy! Thank you so much! Never knew it was just hidden


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums