Listing choises of actions as a hyper link?

So what I want to do is have the player make a choice given in hyper links so like it says what will you do, and the two options given for example are fight or run away, and then it does the appropriate command. How do I do that?


There's several ways to do this. One way would be to use the {command} function.

So, say, you create a command called Fight and another called Run. To trigger Fight, you type in Fight and for Run you type in Run.

Then the code is in a Print, or text:

{command:Fight:The actual text the player clicks on}

Make sure Fight and Run have some special code that keeps the player from calling them whenever they type in Fight. Maybe something like

if Player.FightOrFlight=True

The other way is to use Menu. Create a new variable. I'll call it menulist. Set it to a stringlist. Then add whatever options you want to that list and make sure they're text, not expressions. Then, once you have every option, show a menu that draws from menulist. I recommend not allowing the player to ignore it, but do what your game needs:

list add (menulist, "Option One")
list add (menulist, "Option Two")
ShowMenu ("The text the player sees", menulist, false) {
  if (result = "Option One") {
  Code for if Option One is picked.
  else if (result = "Option Two") {
   Code for if Option Two is picked.

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