what i need the stats to do is the following:
display the level (which changes based on exp. so if your exp is less than 21, you're level 1. between 21 and 50, you're level 2, etc. but it needs to display the LEVEL and no the EXP)
display a bar (which ive figured out) which has a max of 100. if the value reaches 100, the game ends.
display money. which should be simple, but i've been so stuck on the level thing i could scream.
code is below if you really must see it, but like i said... it's essentially useless.
thanks in advance for your patience with me.
SOLUTION:
Code: Select all
init python:
def add_dys(d):
store.dys += d
if store.dys > 100:
renpy.jump("game_over") #this code makes it such that if the "dys" value goes over 100, the game ends and jumps to the scene labeled game over
# The game starts here.
label start:
$ exp = 0
$ dys = 0
$ money = 10
show screen stat_menu
screen stat_menu:
frame:
align (1.0, 0.0) #this aligns the stat box to the top right
xmaximum 200 #this sets the maximum width of the box
background "#393939" #this sets the background colour an image can also be used
has vbox
if exp <= 20:
text "Level 1"
if exp >= 21 and exp <= 50:
text "Level 2"
if exp > 51:
text "Level 3"
bar value dys range 100 #this creates the dysphoria bar
text "Money: [money]"
"Blah blah blah."
"Hey there! Before we get started, why not tell us your name?"
$ povn = renpy.input(_("Type your name and press return/enter.")) or _("Player")
"oh my god."
$ add_dys(10)
"In theory, dysphoria should go up."
$ exp += 21
"Level should increase to 2."
return
label game_over:
"Adrien\'s dysphoria got too high. Game over!"
return