I downloaded Choicescript and followed the basic guide and still got error message after error message. The problem was not the guide, it’s the user. I spent hours trying to figure it out and failed in a flaming ball of epicness. Is there an easier way to make a Choice of… game for someone like me who is apparently extremely code challenged?
Find a coder and ask them to write an example for you? If you PM me I can offer you some pointers on your code. Otherwise there are beautiful walk through both on the COG website and by users:
Thank you so much for the suggestion and resources sir! I am currently trying to figure this site and how to PM you. I used to think myself so tech savvy but whew! Thank you again!
Apologies, you wont be able to PM until you have been a member for a long enough period. Until then you will have to use the walkthrough’s
What exactly is the issue?
Without knowing, it’s best to start with baby steps. So, something like:
The enemies advancing.
You attack and they fall back. *goto attackers_defeated
#Defend. You defend and they fall back. *goto attackers_defeated
The main thing, really, is to make sure the indents are right. One tab, or two spaces between each level, for instance. Also, I’d recommend using notepad++. It’ll help you keep track of indent levels and such.
You can also go a bit more in-depth and change the above to:
The enemies are advancing.
You attack and they fall back. *set attackers_attacked true *goto attackers_defeated
You defend and they fall back. *goto attackers_defeated
*if attackers_attacked = true
After your ferocious onslaught in retaliation, you know they won’t be back for a long time.
*if attackers_attacked = false
You hope they won’t be back for some time.
(apologies about the indents being wrong for the second quote. Not sure why, but under the if statements, indent them by one level before having *ending without any indents.)
attackers_attacked would need to be created as a *temp file possibly at the start of the scene though, like this:
*temp attackers_attacked false
If you want it to be a permanent variable/switch, you’ll need to create it in the startup file, where you’ll replace *temp with *create.
Also, you want the *ending command in there because randomtest will throw up errors if there’s no ending point. So, if you’ve got a choice inserted but no text for it, simply add *ending underneath and it should work fine (I tend to add ‘not written’ in brackets beside the choice as well).
Also, adding further choices before using a *goto command is fine. You just need to manage the indent levels correctly.
Hope this helps and what I’ve posted here should give you a starting point without errors cropping up.
Thank you very much! That really did help me a great deal and I greatly appreciate it sir! I understand a bit more how to correctly input the commands in a simple way. I was making it far too complicated. Thank you again.
You’re most welcome. Feel free to ask anything else.