Hiding or delaying stats in stat sheet

Alright so I have dived into forums, searched and found “how to do it” but when I put it into motion it does not work. I don’t want certain characters to show up until the MC meets them.

of course I’ve tried the *create metperson false / *create person false (on start up)
and done the *if metperson true / *if person true
*stat_chart
percent person

but i keep getting “line x of choicescript_stats: Invalid expression at char xx, expected OPERATOR, was VAR [true]”

I am on CSIDE so the indention has been faitly accurate I do believe, this is my first rodeo but I think I done the *if the right way but apparently I am missing something. Any insights would be greatly appreciated, instead of working on the rest of my story I have been struggling with this all day. I could move on to the other stuff but I figured I might as well get that down 1st before moving on to the heart of the story.

You have to put your code here as you probably declare badly in the startup the variable due the error you have gotten.

For instance, it should be something like this
Startup

*create meet_npc false
*create person 0
1 Like

Also while your doing this I’ve noticed a mistake and that in startup you’ll need

*create metperson false
*create person 0 

If in choicescript_stats

You put:

 percent person

It’s gonna give you a percentage bar

So try something like this

*if (metperson = true) 
 *stat_chart
  *percent person

And set it true later like

  #Hello Chad
   *set metperson true 
3 Likes

Exactly Person has to be a Number as you create a percent I though person was another volean.

1 Like
*if metperson = true

Otherwise, just

*if metperson

And Ctrl + Shift + C (or shift-copy as I call it) to preformat your text.

2 Likes

I figured it out thanks. Couldn’t find my post after I figured it out. Took me all day so I was quite frustrated.

Can you reuse this particular variable for various characters or do you create a new one for each new character

If depends on how you use the variable. However, my recommendation is one for npc to be easier to track an error.

It is easier to localize *meet_npc_jesse
that a general *meet_npc reused hundreds of times

Besides use the same doesn’t make sense as you will have to detail who exactly npc you met with other variables and then return meet to false again. Practical it is not.

2 Likes

Thanks for the help, I appreciate it


Can anyone help me with this?

This is the stats menu

This is the startup

Simply remove the “=” sign in show_rela variable. It should be:

*set show_rela false
1 Like

Thanks for the help. I realized you can’t put mathematical symbols except in *if statements

I still make this mistake sometimes haha, drives me insane when checking for error

2 Likes