how to show Love meters

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
squarecup
Newbie
Posts: 15
Joined: Fri Jan 19, 2018 2:28 pm
Contact:

how to show Love meters

#1 Post by squarecup » Sat Jan 20, 2018 5:06 pm

Hello,

I've been trying for a few days to display the three different meters I've created. I've read the "Screen Language" part in the Renpy documentation, but as english is not my native language, I don't understand what the part says :(

I just want to make something like this :
Bg.PNG
The best would be if I could have three meters but I won't push my luck ahah

If you could help me, it would be awesome !

Thank you

User avatar
Ana
Regular
Posts: 57
Joined: Sun Oct 12, 2014 5:56 pm
Projects: Miasma Override
Organization: AniseStar
itch: anise-star
Contact:

Re: how to show Love meters

#2 Post by Ana » Sat Jan 20, 2018 6:32 pm

I haven't done this sort of thing in a while, but I think you can work with something along the lines of this (before label start):

Code: Select all

screen lovemeter:
    add "heartimage.png":
        xpos 0.0
        ypos 0.0
    text (heartpoints):
        xpos 0.780
        ypos 0.015
        color "#ffffff"
Just change heartimage.png to the name of your image for the heart.

To change the "heartpoints", you can do the following:

Code: Select all

$ heartpoints = 0
You can do the same thing with the other two stats as well, just duplicate them and play around with the x position and y positions.

squarecup
Newbie
Posts: 15
Joined: Fri Jan 19, 2018 2:28 pm
Contact:

Re: how to show Love meters

#3 Post by squarecup » Sat Jan 20, 2018 6:52 pm

Ana wrote:
Sat Jan 20, 2018 6:32 pm
I haven't done this sort of thing in a while, but I think you can work with something along the lines of this (before label start):

Code: Select all

screen lovemeter:
    add "heartimage.png":
        xpos 0.0
        ypos 0.0
    text (heartpoints):
        xpos 0.780
        ypos 0.015
        color "#ffffff"
Just change heartimage.png to the name of your image for the heart.

To change the "heartpoints", you can do the following:

Code: Select all

$ heartpoints = 0
You can do the same thing with the other two stats as well, just duplicate them and play around with the x position and y positions.
Thanks for the reply ! :)

So I've tried your code. The game doesn't indicate any error but nothing appears on the screen :/

User avatar
Empish
Veteran
Posts: 221
Joined: Thu Jan 14, 2016 9:52 pm
Projects: Efemural Hearts, It Ends With Graduation
itch: empish
Contact:

Re: how to show Love meters

#4 Post by Empish » Sat Jan 20, 2018 7:12 pm

You have to show a screen in order for it to show up on the screen.

Code: Select all

show screen lovemeter

squarecup
Newbie
Posts: 15
Joined: Fri Jan 19, 2018 2:28 pm
Contact:

Re: how to show Love meters

#5 Post by squarecup » Sat Jan 20, 2018 7:26 pm

Oh ok, my bad :')

I've tried it and an error appeared :
erreur1.PNG
Here's my code :
erreur1code.PNG

User avatar
Empish
Veteran
Posts: 221
Joined: Thu Jan 14, 2016 9:52 pm
Projects: Efemural Hearts, It Ends With Graduation
itch: empish
Contact:

Re: how to show Love meters

#6 Post by Empish » Sat Jan 20, 2018 7:51 pm

try

Code: Select all

text "[love]"
instead

squarecup
Newbie
Posts: 15
Joined: Fri Jan 19, 2018 2:28 pm
Contact:

Re: how to show Love meters

#7 Post by squarecup » Sat Jan 20, 2018 8:04 pm

Oh my god it's working thank you so much !!!

Post Reply

Who is online

Users browsing this forum: No registered users