Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
I'm copying several snippets of code from this thread viewtopic.php?t=5373 into my own project and trying to get it to work. It's for an overlay that displays your current money, and can be hidden/shown when necessary. My code reads:
$ lioncash = 100
$ show_money()
"Cash is shown."
$ hide_money()
"Cash is hidden."
In game, nothing happens. There's no error message, but the currency doesn't appear either. I've reread the code multiple times and can't figure out why it's not working. One thing of note - the thread I'm using is from 2009: could it be possible that the code has become obsolete over time?
Last edited by renpyuseranon on Sun Dec 09, 2018 11:38 am, edited 1 time in total.
default lioncash = 100
screen money_scr():
text "[lioncash]" size 35 align (0.9, 0.9)
label start:
scene black
show screen money_scr
"..."
$ lioncash += 50
"Hey, what do we got here?.."
hide screen money_scr
"Better not to show vallet here..."
"?"