Greetings! Ok. So, I am creating a game where the player gets to choose romance orientation options:
straight, gay, leiban, etc… if they wish, however I am running into a little issue with it. So, when creating a scene, could I have 2 *if option statements? Does that make sense?
For example, something like…
*if (gender=“female”) and (orientation= “women”)
This is where your text goes if gender female and you’re into women.
But I don’t think my code is working quite right… Soo, how do you people do it?
Testing Mode.
*if (gender=“female”) and (orientation= “women”)
Game in testing mode.
But if you select the female gender and orientation ‘women’, and I code ‘goto_scene that scene’ it just goes to Testing mode (which would happen if you were male), not the Game in testing mode… So I must be doing something wrong?
Word Processor’s insert a lot of weird characters that don’t play nicely with ChoiceScript, avoid them at all costs. Use one of @Delliot’s suggestions or any other “text editor” (as opposed to a “Word Processor”).
The original Notepad will work fine, actually. It won’t introduce any of the errors that programs like Microsoft Word will. The other programs are easier to work with, but the issue with your code is probably not Notepad.
That was my initial complaint too, but after getting used to notepad ++, I found it drastically much better.
Recently I taken up CSIDE which is admittedly a bit counter productive with the layout, but is also much better for a whole host of reasons. Including, indenting, spell check, a testing system, saving multiple files, and that’s just for starters.
If I were you I’d use a Boolean variable instead of a string.
You have (gender = "male") but you’ll find it a lot easier to use (gender = true) for male and false for female.
Why?
Hidden feature that isn’t in the tutorials:
Your character is a @{gender man|woman} in this game.
The multireplace (@ with curly braces {}) allows you to first choose a true/false variable and then have two options based on whether it’s true or false, separated by a | vertical pipe.
If your character is male, the code above returns “Your character is a man in this game” and if your character is female, it returns “Your character is a woman in this game”.
I only just found out about this and it makes it so much easier to do quick little narrative tweaks.
You can also use it for numbers but it has some weird issues with quicktest so it might be good to stick with Boolean true/false for now.