Asking ‘are you sure?’ And repeating a menu

In my game there are a lot of options to choose from, and I want to make it so that if the player accidentally clicks on something they don’t want, there will be an ‘are you sure?’ And the options to choose from ‘yes’ or ‘no’. I’ve done all the scripting for the ‘yes’ part as it’s simple- you just continue with the game. The ‘no’ part is what gets me. Is there a way so, when you click ‘no’, the menu will pop up again, and then when you click on another answer it will come up with the ‘are you sure’ until ‘yes’ is clicked?
For the menu, I am using the ‘if object attribute equals player attribute...’ way.


K.V.

Hello,

This may help:

http://textadventures.co.uk/forum/quest/topic/uxdndzmbpuyhb0twf4aysa/making-a-player-type-a-command-using-if-result#dad14a9c-6346-4f7e-847b-eb9cb28a7913


You can create a function that calls itself again if 'no' is clicked.


If that example doesn't help, you can paste this bit of your code here, and we can help you out.


I just type the menu again.
I use a function.

My code:

options = Split("The game;The anime;Card game;Combat;Items;Finish game;Item Limit", ";")
ShowMenu ("Pokémon Information", options, true) {
  switch (result) {
    case ("The game") {
      msg ("")
      msg ("Ah yes, the game. The original game is a simple RPG. The original games were Pokemon Green in Blue, released in Japan in 1995. They were released as Red and Blue in the US and more in 1997. It can be summed up as follows: 20 minutes story, 300 hours grinding, 5 minutes x 8 gym leaders = 40 minutes for gym leaders, 5 minutes x 5 bosses = 25 minutes for the Elite Four, 200 hours trading/completing the Pokedex, and an optional 200 hours battling. Most casual/novice players stop after they've caught the final legendary, believing they completed the final game. The actual fun parts of the game are all online, and if you can't do that (and you don't have a friend/buy multiple games) you basically have an un-glorified Pokédex. Pokemon Diamond sucks in particular since you can't connect online anymore, and you can't get Spiritomb... sorry, I'm just complaining...")
      a show menu
    }
    case ("The anime") {
      msg ("")
      msg ("Ah yes, the anime. The anime has run from 1998 (or 1997 JP), onward until today. And who knows if it will stop? There are actually multiple anime series based on the games, but there is one that is very famous: the one with Ash Ketchum and his Pikachu. The anime can be summed up as follows: Funny but awkward first season with a noticably lacking budget, a second season without Brock, and Ash actually won a league, the Johto series which was 90% filler and went on forever, an okay Advanced Series, an Awesome Battle Frontier series with major improvement past all former series, a decent Sinnoh series, and all the other series so far were just 'meh.' Currently, they are having a series where Ash Ketchum goes to school. Seriously. Pokemon Sun and Moon. Look it up. Also, Ketchum is an actual English last name. Wikipedia. https://en.wikipedia.org/wiki/Ketchum_(surname) There are also various other small episodes shows, mainly written for new games. An example: The Pokémon Mystery Dungeon Series. I also recommend Pokémon Generations and Pokémon Origins.")
      a show menu
    }
    case ("Card game") {
      msg ("")
      msg ("Ohhh.... yeah, the Card game. This is different since I don't play the card game. I only collect them... for fun. And I like to look at them. As far as I know, the card game can be bought at any Walmart, usually for around $4-$5 per pack. The inside usually contains one good card, some okay cards, and if you're unlucky you'll get a Caterpie card. The game is played in a Magic the Gathering type fashion. Each 'Trainer' has 20 HP points. You try to 'faint' (but everyone says kill) the other Pokemon/trainer. There are energy cards. You get the gist of it. The good part about this game, is at least you don't have to blurt out \"I activate my Voltorb... now I use my Electroshock for 30 damage on your active Pokemon.\" ...Usually.")
      a show menu
    }
    case ("Combat") {
      msg ("")
      msg ("Combat coming soon. Just set the Pokémon. Remember to save!")
      a show menu
    }
    case ("Items") {
      msg ("")
      msg ("The berries heal health, and heal other status ailments. Oran Berries and Sitrus Berries heal health. Full restore heals health and heal all status conditions. Pecha Berries heal poison. More about items soon to come.<br/>")
      a show menu
    }
    case ("Finish game") {
      msg ("")
      msg ("There is no ending. It's an open world RPG. To win the game, you will need to get 8 badges, and then defeat the Elite Four. I'm not even done editing the game yet...")
      a show menu
    }
    case ("Item Limit") {
      msg ("")
      msg ("You have an inventory limit of 50 items. You have a Pokémon team limit of 8 Pokémon.")
      a show menu
    }
  }
}

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

Support

Forums