Stat Variables

I’ve dabbled with Choicescript for awhile, but I’ve hit a bit of a roadblock with one issue.

So, let’s say I want to hide or alter the player’s stats during certain scenes. For example: the player starts the game with 5 charm, but makes a choice that brings it to 30, but a flashback in a later chapter takes place that will set it to default (5), and goes back to where it was (30) when the flashback ends. How do I go about altering the stats between the present and flashback? I would think variables and maybe if statements? I’d appreciate any help on this problem.

Will the flashback section linear (all you did happens again) or could the player make different choice?

Let’s try it with charm. You need to have two stats:

*create charm (normal value)
*create charm_fb (the start value for the flashback)

You also need a flag to determine if you are in a flashback or not, let’s call that ‘realtime’

*create realtime true

On the character sheet you show the stats as follows:

*if realtime
    (here you display the normal stats, don't forget the proper indention)

*if not(realtime)
    (here you display the flashback stats)

Once you enter a flashback you set ‘realtime’ to false.

*set realtime false

This changes the stat sheet. In the flashback scenes you need to test against the flashback values of the stats though, so don’t mix them up with the realtime ones.

*if charm_fb < 10

Once you exit flashback, you just:

*set realtime false

And the stat sheet gets back to normal.

That means you can also set different flashback stats depending on when it happens.

Hope this helps.


That was much simpler than I expected! Thanks for the help, this worked like a charm!


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.