script.rpy:
Code: Select all
define e = Character("Eileen")
default money = 1500
label start:
e "You've created a new Ren'Py game."
e "Once you add a story, pictures, and music, you can release it to the world!"
e "3"
e "2"
e "1"
e "start game!"
Code: Select all
screen HUD():
text "[money]":
xpos 1600
ypos 40
button:
xpos 100
ypos 40
text "spend -100 money"
action [ SetVariable("money", money-100) ]
init python:
config.overlay_screens.append('HUD')
then, when I rollforward, I still have 1500 money. it's as if the choices I made have been disregarded... why?
**note**
this does not happen with:
Code: Select all
menu:
"spend 100 money":
$ money -= 100
how can I make a button for inventory (use items), combat, etc? if players can then rollback and everything is reset then rollforward. nothing will function. so the whole game can only be done with menu? why bother having variables and actions and sreens if only menu works?!
or am I doing something wrong??