Hey everyone, I’m not new to writing multiple choice games/stories, but I am new to using anything other than HTML or CSS.
I’ve figured out how to open and edit the file provided on the Introduction page. I have my story and the structure of the game already because I want to convert one of my old multiple choice stories to ChoiceScript. But I need help with how to make the player’s choices stick and carry through the game.
For example, I want the player to be able to chose a first name for the PC, gender and a class, as well as being able to decide if she/he has an already established relationship with one of the other characters. How do I write this in ChoiceScript?
Any help, or finger pointing me in the right direction is most welcome.
Although the wiki is fine, I learned to code by using the explanation on the choice of games site. (it might be what you meant by introduction page, but there are multiple pages, include one that explain how to edit names etc.) You might not need it, but it can’t hurt to look.
I’m sure you’ll see it in the links provided, but a quick note:
Any permanent variables/switches need to be created in the startup.txt file before any text the player sees.
So . . .
*create name “”
*create money 0
*create engineer false
*temp switches/variables, for just the current scene, are okay to be created in the relevant scene.
Edit: Oh . . . on the relationship thing.
Are you in a relationship?
*set in_relationship true
*set in_relationship false
*if in_relationship = true
I'm in a relationship.
*if in_relationship = false
I'm not in a relationship
I only separated the *if statements from the choices, putting them into their own label, just to illustrate more simply how you can adjust the text on the fly based on previous choices.