Choices and roots

So, I have my startup file, and am trying to put 3 root choices, then a number of choices for each one.
1, assault the town.
2, enter the forst.
3, rade the graveyard.
However, not sure what I am doing rong, it only comes up with the first choice, and when I click on it, it just asks me to play again.
Here is what I did, perhaps someone can help me fix it or something…

*Choice
  #Assault the town below us now, killing all and raising them into your army.
   You make ready to kill the townsfolk, and raise them.
   How do you want to go about it?
  #Scout the town so you have more infermation before the assault
You send out your troops, but who should you send?
*finish
*choice
  #Send zombies.
Zombies are tough, but slow. Good in hand to hand, but not if you want to do any stelthing.
  #Send Skeletons
Skeletons are good with ranged attacks, and are light on their feet.
*finish
*lable quicktown
*choice
  #Send your forces into the forests around town to harvest the bounty of corpses located in their depths.
What do you want to send?
*finish
*choice
    #Send Skeletons
    #Send Zombies
    #send both
    *finish
*goto forest
*lable forest
*choice
  #rade the local graveyard for the required raw meterials
*finish

Also, thinking of just haveing each choice leade to another scene file, might make things easier. I know about the "goto scine, command, I assume that would work?
It said it does work in the Wiki, but am a bit foggy on how. Don’t think I quite get the variables yet, also nut sure where to put them.
Ugg…

1 Like

I think the problem is the *finish command you placed at the end of the choice

you could use a *goto scene there instead because it sounds like your’re about to write a lot after, that might make it easier to keep track of everything, if you use *finish it will end the game there and ignore everything after

Don’t forget to add a *label with the same name as the *goto though or it will show up an error ^^

I think adding a scene file might work too with the right *label, but I’ve never done it tbh, I like to have my chapters in one place x)

Alternatively this is the way I did it for a short part in my story, that might be useful for your section too, but I wouldn’t recommend it for more than two or three choices after another, or you might lose oversight of them all

*label haircolorchoice
*fake_choice
    #.. platinum hair.
        *set haircolor "platinum"
        You squint at your reflection, taking in the ${haircolor} coloration of your hair. Wait... is that…?
        *choice
            #A gray streak...
                *set grays true
                A gray streak… 
                
                It's almost embarrassing that you didn't notice it until now. It feels so obvious now that you stare at it in the mirror.
                
                It happens sometimes when victims survive their possession. Sometimes the stress becomes too much for the body to handle. Apparently the same is true for you.
                
                [i]Unlike mother.[/i]
                *goto ch1_3 
           #Nothing, just a trick of the light.
                You breathe a heavy sigh- just a trick of the light, nothing to worry about. Your ${haircolor} hair is still free of any grays. 
                
                [i]Just like mothers.[/i]
                *goto ch1_3
1 Like

First of all please use the Preformatted text option to show the code so we can see it propperly.
Now I’ll modify your code a little bit adding (descriptions) so maybe you can understand how it works.

I highly recommend you to read this. There’s a lot of simple problems that can be solved by looking at the info on those links



here is some more info
https://www.choiceofgames.com/category/blog/game-design/
1 Like

I’ve wrapped your code in preformatted tags, for as mentioned above, it helps us (help you!), immensely.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.