Hey! This is my first topic here and my English is kinda bad, so I’m sorry if it’s hard to understand what I’m trying to ask.
I wanna know if there’s a a way to create a statistic and not to show it to the readers? I mean, I’m working in my first game right now and the relationship of the MC with their parents will matter in some dialogues, but as this is not so important to the game, I don’t wanna put they in the relationship stats. But at the same time, I would need the info of their relationship in private so the dialogues can be suitable. Is there a way to do that?
Sorry for any mistakes, and thanks for your time and possibly help!
Yup, you could just handle it the way you would a normal stat (i.e. create the variable in startup and modify it as you go along) but just leave it out of the stats file. Making a couple of comments whenever you call it might help you keep track of it as well!
Thank you! I’m sure it’s obvious, but I’m like, totally new on this scripting thing, and wasn’t sure if that would work. It’s glad to hear is that simple
This is a great solution, but to be ULTRA careful, make sure that one of those is >= 50 or <= so 50 that a result of exactly 50 won’t cause the game to go haywire.
I cannot even tell you how much hair I ripped out of my skull in one game I was writing when it kept freezing, and I finally tracked it down to a situation like that (a result not foreseen in the *if stack).
As long as you don’t *text, *percent or any other commands that are used to display stats on the choicescript_stats.txt file those stats will be hidden to the readers.
Ngl, all the if-else stuff stills kinda complicated to me, I haven’t used it yet. But when I leran to use it properly, I will take your advice into consideration!
Here’s my advice to you and anyone else who isn’t a pro coder so that you can always easily find those errors.
Let’s say you want to choose between two options (as in the OP).
*if A = true
*goto A
*elseif B = true
*goto B
*else
something went wrong in the A/B stack!
That way, the “something went wrong” message will pop up if something manages to slip through your If/elseif stack. But if your stack does work just fine, the reader will never see the message, so you don’t lose anything.
I realize it seems absurdly pedantic to do it for just two choices, but when you get to a larger stack of 'em (a game I’m writing now has 12), then you’ll be glad to get the “something went wrong” message rather than an infinite freeze loop.