- Feb 2, 2018
- 923
- 3,925
Hi mates,
I am having trouble figuring this out.
For the game, I develop I have status bars that don't show any progress when the player gets points. I did some tests and if a player will receive 40 or more points, it will show the progress in the bar but if the player points are under 40, the bar will still be empty.
Le code de vie:
status_setup:
script.rpy
screens.rpy:
What can I do?
Thank you!
I am having trouble figuring this out.
For the game, I develop I have status bars that don't show any progress when the player gets points. I did some tests and if a player will receive 40 or more points, it will show the progress in the bar but if the player points are under 40, the bar will still be empty.
Le code de vie:
status_setup:
Code:
init -5 python:
style.my_barlove = Style(style.default)
style.my_barlove.left_bar = Frame ("gui/love_full.png", 0, 0)
style.my_barlove.right_bar = Frame ("gui/love.png", 0, 0)
style.my_barlove.xmaximum = 680 # bar width
style.my_barlove.ymaximum = 214 # bar height
style.my_barlove.xalign= 1.0
style.my_barlove.yalign= 1.0
init -6 python:
style.my_barlust = Style(style.default)
style.my_barlust.left_bar = Frame("gui/lust.png", 0, 0)
style.my_barlust.right_bar = Frame("gui/lust_empty.png", 0, 0)
style.my_barlust.xmaximum = 680 # bar width
style.my_barlust.ymaximum = 214 # bar height
style.my_barlust.xalign= 1.0
style.my_barlust.yalign= 1.0
Code:
# here I set the variable for a character, to zero
$ mot_love = 0
$mot_lust = 0
Code:
screen mot:
modal True
frame:
background "bg.jpg"
bar:
style "my_barlove"
value mot_love
range 100
yalign 0.1
xalign 0.0
bar:
style "my_barlust"
value mot_lust
range 100
yalign 0.45
xalign 0.0
Thank you!