(I'll let someone else cover that one, [...]
Looks like I'll be this someone.
Screens are automatically updated by Ren'py, therefore, if you define a screen that will show the value, then you'll have your solution. Technically there's no effective delay between each update of a screen, but there's at least one for each interaction, which guaranty to have a value that stay accurate.
As for the screen itself, there's many way to do it. It can be by using text substitution :
Code:
default myVar = 0
screen myScreen():
text "value: [myVar]"
Directly have the value as text :
Code:
default myVar = 0
screen myScreen():
text str( myVar )
Text replacement (the old way) :
Code:
default myVar = 0
screen myScreen():
text "value: %s" % myVar
Or text replacement (the new way) :
Code:
default myVar = 0
screen myScreen():
text ( "value: {}".format( myVar ) )
And finally to show the screen, you can add it to the
You must be registered to see the links
list :
Code:
init python:
config.overlay_screens.append( "myScreen" )
You can decide to show it or not, by changing the value of
suppress_overlay
(undocumented), but it will affect all the possible overlays (including the "quick menu").
You can simply show the screen and never hide it. It will stay on the screen unless you decide to effectively purge all the visible screens :
Code:
label start:
show screen myScreen
Or you can include (with the
You must be registered to see the links
screen statement) it to every screen that need to show the value :
Code:
screen myOtherScreen:
[...]
use myScreen
I once wrote a more complete answer regarding this, it's somewhere on this forum, but I don't really remember where.