Skipping the intro?

I’ve made the intro to a game. If people want to skip the intro, how do I incorporate a little menu before it starts that the player can select and skip it?


(filler for getting my edited post, updated/posted)


the simplest method is to use the built-in 'ask / Ask' Script/Function (in code):

(hopefully you can find it as a Script option via using the GUI/Editor: run a script -> add new script -> ???, if you're not familiar with coding yet)

'ask' does a popup window menu
'Ask' does an in-line menu (as hyperlink choices in the big text box area on the left side)

you chose 'yes' or 'no' in the ask/Ask menu, which in coding, is converted into boolean values: 'true' (if you chose yes) or 'false' (if you chose no), which you can then use the 'if' Script to check/compare the string matching (see below, for how)

if you want the 'in-line' menu (instead of a popup menu), then just change the lower case 'a' in 'ask' to a capitol/upper-case 'A'

// with my comments:

<game name="example_game">
  <attr name="start" type="script">
    ask ("Skip Intro?") {
      // quest, with 'ask/Ask' and 'get input' and maybe a few other Scripts/functions, automatically (hidden from you), stores your choice value into the built-in 'result' Variable VARIABLE
      // here's what happens automatically (hidden from you) with using the 'ask/Ask' Script/Function:
      // either:
      // result = true // if you chose 'yes'
      // or
      // result = false // if you chose 'no'
      if (result) { // if (result = true)
        msg ("You chose to skip the intro")
      } else { // if (result = false)
        msg ("YOUR_INTRO")
      }
    }
  </attr>
</game>

// ---------------------------------------------

// without my comments:

<game name="example_game">
  <attr name="start" type="script">
    ask ("Skip Intro?") {
      if (result) {
        msg ("You chose to skip the intro")
      } else {
        msg ("YOUR_INTRO")
      }
    }
  </attr>
</game>

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

Support

Forums