Here is another puzzle--at least, it is a puzzle to me.
I have stats at the bottom of my screen. They tend to change position a bit when data changes.
How can I simply set an absolute value--a margin, so that "xp" is indented just a bit from the right edge of the screen and actually stays at that indentation as its numbers get bigger? (It is the last item listed and you can probably tell I can't quite figure out xalign, xpos, etc).
Any wisdom would be greatly appreciated.
screen statsfull:
hbox:
yalign 0.99
xpos 0.01
xfill True
text("{color=#5f9ea0}Fear: %d" % fear, "/%d{/color}" % fearmax)
text("{color=#5f9ea0}Stam: +%d{/color}" % stam)
text("{color=#5f9ea0}Per: +%d{/color}" % per)
text("{color=#5f9ea0}Att: %s{/color}" % att)
text("{color=#5f9ea0}HP: %s{/color}" % hp)
text("{color=#5f9ea0}Lvl: %d{/color}" % lvl) xpos 0.85
text("{color=#5f9ea0}XP: %d" % xp, "/%d{/color}" % xpmax) xalign .85
how to set an absolute margin
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.
Re: how to set an absolute margin
Might have to use area(xpos, ypos, width, height) instead of yalign and xpos so that it updates and stays in the right spot.
You'll probably still want to have some code limiting just how long the "exp" amount can get tho. Outwise after playing the game long enough weird things might start happening
You'll probably still want to have some code limiting just how long the "exp" amount can get tho. Outwise after playing the game long enough weird things might start happening
Who is online
Users browsing this forum: No registered users