answering yes or no

so i got a shop keeper and if i speak to it, it print out a massage and the massage says do you wanna buy this skill book? (click yes or no to choose) and if this happen i want to make yes to print out a question. and if it print out the question i want to make to print out the answers and make it click to answer.
i know this doesn't make sense but i think you guys know what I'm talking about


Io

Read up on how Show Menu works, that'll give you what you need.


First one. (good)

options = Split("Yes; No", ";" )
Show Menu ("Shop", options, true) {
  switch (result) {
    case ("Yes") {
      msg ("")
    }
    case ("No") {
      msg ("")
      }
    }
  }
}

Second one. (bad/hard to get the player to cooperate)

Get Input{
  if (result = "Yes") {
    msg ("You said yes to the shopkeeper.")
  }
  else if (result = "No") {
    msg ("You said no to the shopkeeper.")
  }
  else {
    msg ("You were confused by the shopkeeper." )
  }
}

read this post of mine: scroll down a bit to the first grey code box section for specifically how to use the yes/no 'ask/Ask' Scripts/Functions (but you should read everything if you can understand it):

http://textadventures.co.uk/forum/quest/topic/qdujhbxvpk2pwdflcuneta/questions-and-further#882c25b0-57d3-4289-8a0a-dc88195d826a

ask if you need help with anything and/or if don't understand stuff


Log in to post a reply.

Support

Forums