QuestJS icon indicating copy to clipboard operation
QuestJS copied to clipboard

INTRO command enables speech (and throws an error if settings.intro is undefined) (with fix)

Open KVonGit opened this issue 6 months ago • 0 comments

My current patch job:

  new Cmd('MetaIntro', {
    script:function() {
      if (typeof settings.intro === "string") {
        msg(settings.intro)
      }
      else if (typeof settings.intro === "array") {
        for (let el of settings.intro) msg(el)
      }
      else {
        msg ("This story has no intro.", {}, 'parser')
      }
      return world.SUCCESS_NO_TURNSCRIPTS
    },
  })

KVonGit avatar Jul 14 '25 04:07 KVonGit