Perhaps the question was not aptly phrased, but I’ll do my best to explain it here. I’m rather new to Choicescript, having just started yesterday.
What I want to know is, how should I structure the *if command for whole scenes instead of choices? And not based on stats, either. Like, for example:
Let’s say the main character talks to Daria. If character has complimented Daria, then (for example):
*set daria_compliment true
Of course, we would have to set up [*create daria_compliment true] in the startup
Fast forward several scenes later:
*if daria_compliment true
Daria gives you a kiss! “I love you,” she declared. The two of you live happily ever after.
*finish
*else
Daria just smiles at you. You stay good friends.
*finish
If it helps, I’ve mostly been going through the ChoiceScript introduction guide. Any help will be greatly appreciated!
Actually this is something that’s always confused me as well. Does there have to be a choice statement in there? Or can you just have something like
Story paragraph ends here
*if ( element = "water" )
Storyline for water
*if (element = "fire" )
Storyline for fire
And just have the story continue without having to make a choice? (I’ve been trying to engineer choices to split the storylines which isn’t always easy)
Yeah, I’m still trying to figure it out. I ran into another error again that says I’m missing a VAR or something like that… I’ll post the whole message once I get to a computer. I’m using my phone right now
@Jacic can you tell me how you’ve been doing it so far? And has it worked, despite being difficult?
I haven’t tried using it without a choice statement (Guess the easiest thing to do would be for me to just to try it out and see if it works).
It works fine otherwise with the *if choices. The only issue is you sometimes end up with single selectable choices because the others are hidden which most people don’t like in games.
And they
*if element = "water"
went to the world of water.
*goto_scene water
*if element = "fire"
went to fire world.
*goto_scene fire
lived happily ever after.
*finish
If element is water or fire, the MC goes to a specific scene. If the element is neither water nor fire, the MC reads “And they lived happily ever after.”, and the game ends.
Also as well… With the right spaces under the if statement. You can add more than one line, or several paragraphs as in example here…
*if s = true
"Ahh...It is good to see a recruit that knows to solute their commanding officer. It seems you paid attention while you were in the academy." She says with almost a happy tune to her voice. But that is short lived.
*if s = false
"Don't you know to solute your commanding officer or don't you even care. I have been doing this for a very long time and I require every one to show some respect. Is that understood!" She says with almost a soar note.
"Yes commander, that is completely clear." He says almost half aware that the others are looking in his direction.
That’s odd. A boolean is a variable that’s either true or false, while this bit of code only makes use of numerical variables. Or are you forgetting brackets somewhere?
Anyway, it looks like you found a workaround for your problem, so it doesn’t really matter anymore. Good luck.