Help with *choice command

I’m having trouble with, ironically, code in general.

The error I’m getting is that I don’t get it. I’ve formatted it and done what it says, and I can do it, but I don’t understand.

My code looks like this:

     #Ask a question on the ChoiceOfGames forum
        If you can get their attention, you'll finally get out of your hole!

     #Spam the admins with a python script, that'll work!
       That's definitely not harassment in any way!

     #Hunt down the admins and ask them the question personally
        You could get arrested *if you get caught.* that how you do it?!

You don’t need to use *choice for each branch of choice the reader can make.
Here’s what I mean:

  #Some random sentance. 
    *goto (random thing; use if the choice sends the reader into a different scene in the file.)
  #Some random sentance. 
    *goto (random thing) 

And don’t forget your goto your code needs to know where to go if the player chooses a choice in the example below if you decide to run it will take you to the run scene

  #Run away
   You pack your bags and run
   *goto run

*label run
Running away was the bet decision you had ever made.

Fair question. Me myself took some good time (years?) To figure that out. And even today I still got some trouble differencing *choice from *fake_choice.

1 Like

*fake_choice do not need a goto. So I mostly use them and use the *choice only, when I am brancing afterwards.

So I use a choice only when it gets you to a different scene, fake_choices are what I use for flavour text and stat rising choices even for minor branches, I should change that perhaps to make the code more readable. ^^

So to make it short
# the choice itself
the text after the choice
*goto the scene your choice refers to
# the other choice
the text for this choice
*goto the scene this choice brings you to

Code Example


            percent b Body
            percent m Mind
            percent s Soul
            opposed_pair cool 
                hot blooded
            opposed_pair impulsive
            opposed_pair creative
                by the book
            opposed_pair funny
            opposed_pair gentle
            opposed_pair genuine
        *goto screen
        *if partner 
                text pname
                percent pfriend
                percent plove
                percent pmood
                percent psurvival
        *goto screen
        *goto needs

a fake choice work that way:

# the choice itself
text of the choice
*set stat + whatever
# the other choice
the text for the other choice
here comes a text that would be shown after both choices

    #Everything is right
        *set m +5
        You planned ahead and prepared your home for the vacation. All is set and ready, cables unplugged, water shut down. Everything you need is packed, a small lunch prepared.
    #Look at your painted list
        *set m +5
        You take a quick look at the artful list you drew last week. Seems you worked through everything. You check the image of you with the suitcase.  
    #Take a deep breath
        *set s +5
        You smile. Everything feels fine. You thought of everything and are confident, that all is well.
    #You suddenly realize
        *set s +5
        While taking a quick glance around, you se the little red light of the TV set burning. You quickly unplug the cable. Now everything should be fine.
    #Go for a rush
You see a cab arrive and parking next to your door. You take the tickets, your purse and your keys from the desk and pocket them. 

Oh and please do not open a new thread for every question you have, this clutters the forum, so try to reuse your threads when you have a new question, or use threads related to your question, this helps to keep the forum clean :smiling_face_with_three_hearts:


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