How to Use Graphic in Bar Help?

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.
Post Reply
Message
Author
User avatar
SmartAppleGames
Newbie
Posts: 15
Joined: Wed Feb 15, 2017 12:39 am
Contact:

How to Use Graphic in Bar Help?

#1 Post by SmartAppleGames » Wed Feb 15, 2017 2:28 am

hi im trying to add a graphic as a label in two bars but i get errors i think im coding it wrong. how should i do this?

default stat = 0
default stat2 = 0

screen sidebar:
frame:
has vbox
hbox:
image stat = "stat.png" xminimum 100
bar value stat range 100 xmaximum 400
hbox:
image stat2 = "stat2.png" xminimum 100
bar value stat2 range 100 xmaximum 400

User avatar
wyverngem
Miko-Class Veteran
Posts: 615
Joined: Mon Oct 03, 2011 7:27 pm
Completed: Simple as Snow, Lady Luck's Due,
Projects: Aether Skies, Of the Waterfall
Tumblr: casting-dreams
itch: castingdreams
Location: USA
Contact:

Re: How to Use Graphic in Bar Help?

#2 Post by wyverngem » Wed Feb 15, 2017 2:52 am

You need to remove the has vbox and just write it in like this.

Code: Select all

default stat = 0
default stat2 = 0

screen sidebar:
    frame:
        vbox:
            hbox:
                image stat = stat xminimum 100
                bar value stat range 100 xmaximum 400
            hbox:
                image stat2 = stat xminimum 100
                bar value stat2 range 100 xmaximum 400
Last edited by wyverngem on Wed Feb 15, 2017 1:24 pm, edited 1 time in total.

User avatar
SmartAppleGames
Newbie
Posts: 15
Joined: Wed Feb 15, 2017 12:39 am
Contact:

Re: How to Use Graphic in Bar Help?

#3 Post by SmartAppleGames » Wed Feb 15, 2017 3:32 am

I copy pasted your code but get error msg.

image stat ->= "stat.png" xminimum 100 expected keyword argument, colon, or end of line

doesnt work, any other solutions?

User avatar
wyverngem
Miko-Class Veteran
Posts: 615
Joined: Mon Oct 03, 2011 7:27 pm
Completed: Simple as Snow, Lady Luck's Due,
Projects: Aether Skies, Of the Waterfall
Tumblr: casting-dreams
itch: castingdreams
Location: USA
Contact:

Re: How to Use Graphic in Bar Help?

#4 Post by wyverngem » Wed Feb 15, 2017 1:25 pm

Sorry, I was half asleep when I posted this. It's just stat no quotations.

Post Reply

Who is online

Users browsing this forum: No registered users