Difficulty with variables

Is there a way for writers to run something that counts each + or - to a stat, and gives you a grand total for how high or low the stats can go?

Count the change/mod. to a var, or check the new value of the var?

To print the value of a variable, use ${varname} syntax

What do you mean, like if you have 43% in strength and you want to add more?

There’s nothing built-in that I’m aware of. You’ll have to code it yourself. You can create a subroutine to do it and call it with *gosub (or *gosub_scene). You can add parameters to your call for your subroutine to act upon.

I use quite a few code blocks that are called from all over the place. Saves a lot of repetition and messing about.

If you’re going to do that, you should take a look at https://www.choiceofgames.com/make-your-own-games/choicescript-advanced/ - specifically the sections about gosubs and redirection (which they call ‘Truly bizarre references’ for some obscure reason).

1 Like