How to make a Gui Screen that displays your money.
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.
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.
How to make a Gui Screen that displays your money.
Hey everyone, i'm really stuck. I've been wanting to create a GUI screen or just basic UI screen at the top of my game that displays the player's current gold count.
Any ideas on how it could be done? Thanks.
Any ideas on how it could be done? Thanks.
- gamerbum
- Regular
- Posts: 128
- Joined: Fri Sep 18, 2015 4:40 pm
- Projects: Our Lovely Escape, Mizari Loves Company
- Organization: Reine Works
- Tumblr: reineworks
- Location: Canada
- Contact:
Re: How to make a Gui Screen that displays your money.
I haven't needed to do it and thus haven't actually tried, but couldn't you theoretically just add it on as a section of the quick menu screen (since that displays while you're actively playing the game) and to display the player's total gold, simply have it call the variable that counts gold?
Re: How to make a Gui Screen that displays your money.
How would I do that? I'm really new to Renpy so i like to know the steps to absolutely everything.gamerbum wrote:I haven't needed to do it and thus haven't actually tried, but couldn't you theoretically just add it on as a section of the quick menu screen (since that displays while you're actively playing the game) and to display the player's total gold, simply have it call the variable that counts gold?
Re: How to make a Gui Screen that displays your money.
What you're looking for is answered here viewtopic.php?f=8&t=40010#p426163
Considering this was posted only two days ago, you really should try and look for things before asking questions. The simpler the question the more likely the answer exists already.
Considering this was posted only two days ago, you really should try and look for things before asking questions. The simpler the question the more likely the answer exists already.
If we are what we repeatedly do, then good coding is not an act, but a habit
Re: How to make a Gui Screen that displays your money.
In all fairness, the topic was titled something much different than what I was directly looking for. This tends to be the issue in situations like these.Iylae wrote:What you're looking for is answered here viewtopic.php?f=8&t=40010#p426163
Considering this was posted only two days ago, you really should try and look for things before asking questions. The simpler the question the more likely the answer exists already.
One more question, because of that topic, i've been able to successfully pull it off. The only issue now is that there is no background behind the text. How at all could I do that? Thanks
Re: How to make a Gui Screen that displays your money.
Try to put text inside a frame - https://www.renpy.org/doc/html/screens.html#frame
Re: How to make a Gui Screen that displays your money.
Thanks for the reply, I've been practicing around with it but so far i've come up with nothing successful. Sadly for me, i'm the type of person who learns from examples rather than pre-context statements.Alex wrote:Try to put text inside a frame - https://www.renpy.org/doc/html/screens.html#frame
Lets say for instance that I use this code.
Code: Select all
default hp = 10
screen stats():
text "HP: [hp]"
label start:
show screen stats
"Game starts."
$hp = 5
"You now have 5 hp, you can see that on the screen."
Re: How to make a Gui Screen that displays your money.
Code: Select all
screen stats():
frame:
text "HP: [hp]"
You can pretty much mix and match, so you can have text within a hbox within frame within a vbox within a window within a screen.
- papiersam
- Veteran
- Posts: 231
- Joined: Fri Aug 12, 2016 2:24 pm
- Completed: Gem Hunt Beta, 1/Probably, Animunch
- Projects: The Panda Who Dreamed
- Contact:
Re: How to make a Gui Screen that displays your money.
Don't forget zorder if you want the screen to stay above the other screens and all.
Who is online
Users browsing this forum: No registered users