Adding stats

I’m still fairly new to ChoiceScript so don’t judge to harshly if its obvious :slight_smile:

I’m trying to figure out a way to add stats in Chapter 2 of my game without having them show up in the startup. (I don’t want to hint at what choices the player will be making ahead of time.) If anyone knows any type of work around it would be greatly appreciated.

You have to use the *create command to initiate your stats in the startup file, but you can use variables and *if commands to prevent them from showing up on the stats screen until Chapter 2. So for example, in your startup file you’d have something like:

*create stat1 0
*create stat2 0
*create stats_display false

And then in your choicescript_stats file, you’d have:

*if stats_display
  *stat_chart
    percent stat1
    percent stat2

And then all you’d have to do is *set stat_display to true when the time comes in Chapter 2. Until then, they’d be invisible to anyone not looking at the code.

3 Likes