New to twine, show statistics change

Please specify version and format if asking for help, or apply optional tags above:
Twine Version: 2.3.8
Story Format: SugarCube 2.31.1

I am using several variables in my story, for example energy.
In the story I have the following code:

<<link [[Go to Downtown (20 minute walk)|Downtown]]>>  <<EnergyDown 10>> <<addmins 20>><</link>>

What I want is that its easier for the player to see changes in the statistics; when reaching passage ‘Downtown’ it should show ‘Energy -10’.

Anyone have a suggestion how to do this?

What if <<EnergyDown>> doesn’t just change the energy, it also saves the change to, say, $EnergyChange, and then you can show that (and unset it) in the next passage?

<<if def $EnergyChange>>Energy $EnergyChange<<unset $EnergyChange>><</if>>
1 Like

You could show it on the sidebar. Create a passage named “StoryCaption”. Write something like: “Energy: $Energy” in there. Also create a passage named “StoryInit”. Set initial energy there. Use setter links or the link macro:

[[Go to Downtown (20 minute walk)|Downtown][$Energy -= 10]]

or

<<link "Go to Downtown (20 minute walk)" "Downtown">><<set $Energy -= 10>><</link>>

Ok thx Josh, that helped a lot.

@Janos, already use the StoryCaption indeed, but with several stats its hard to track all the changes for the player.