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:
*choice
#Ask a question on the ChoiceOfGames forum
If you can get their attention, you'll finally get out of your hole!
*choice
#Spam the admins with a python script, that'll work!
That's definitely not harassment in any way!
*choice
#Hunt down the admins and ask them the question personally
You could get arrested *if you get caught.*
Is...is 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:
*choice
#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)
etc...
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
Ex:
#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.
*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
*choice
# 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
Example:
*choice
#Abilities
[b]Abilities[/b]:
*stat_chart
percent b Body
percent m Mind
percent s Soul
[b]Traits[/b]:
*stat_chart
opposed_pair cool
hot blooded
opposed_pair impulsive
organized
opposed_pair creative
by the book
opposed_pair funny
serious
opposed_pair gentle
ruthless
opposed_pair genuine
manipulative
*goto screen
#Relationships
[b]Relationships[/b]:
*if partner
*stat_chart
text pname
percent pfriend
percent plove
percent pmood
percent psurvival
*goto screen
#General
*goto needs
a fake choice work that way:
*fake_choice
# 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
Example
*fake_choice
#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