Help with true/false

I asked for help on a separate issue but I decided I’d reach out about both to try my luck. Essentially, I tried to use true/false variables so that it’s not until the reader gets to a certain in the story that a bit of text appears in the stats.

The way I attempted to do this was:
In my startup scene
*create mourning_song true

Then in my prologue:
*set mourning_song true

And in my stats to initiate:
*if (mourning_song)
[story text]

But it didn’t work. The story text appears before you get to that point in my story.

I really don’t know where I’m going wrong, please help! Thank you :slight_smile:

When you create the variable in the startup scene, you need to create it as false instead of true. Like this:

*create mourning_song false
Long-ish explanation

You can *create variables at any value that you want (either in the startup scene or using the *temp command elsewhere.) This goes for true/false, numerical values, and even the retrievable "text" variables.

However, whatever they are when you first *create/*temp them will be their default state until you change it with a *set command.

So your mourning_song variable is reading as true by default because that’s how you created it; meaning your *set true command in the prologue doesn’t change anything. That’s also why your stats page is always displaying it. Because it’s never set false.

I saw your other post and I would guess that you’re having the same problem with the *temp values as well, but it’s hard to say for sure without seeing more of the code or knowing what kind of errors your encountering.

Anyway, ‘mourning song’ is a pretty epic variable name! And I hope this helps!

1 Like

Thank you so much, this worked perfectly! I was genuinely losing hope before, now the answer seemed so simple all along haha!! Very grateful <3

Also, I have yet to tackle my other dilemma, but I will try now with all the help I’ve been getting

1 Like

Happy to help! And to hear that you’re not giving up. The forum is a great place to look around for answers!

1 Like