Help Displaying Bar (Where to put code)
Posted: Wed Feb 15, 2017 12:53 am
hi im having difficulty displaying bars for ui, im not sure where in the code structure to put it. currently the only way to load game is to put it above label start: if i put anywhere after it, i get errors
# The game starts here.
screen sidebar:
frame:
has vbox
bar value stat range 100
label start:
# Show a background. This uses a placeholder by default, but you can
# add a file (named either "bg room.png" or "bg room.jpg") to the
# images directory to show it.
scene bg room
# This shows a character sprite. A placeholder is used, but you can
# replace it by adding a file named "eileen happy.png" to the images
# directory.
show eileen happy
# These display lines of dialogue.
"Hello, world."
a "You've created a new Ren'Py game."
a "Once you add a story, pictures, and music, you can release it to the world!"
# This ends the game.
return
the above works but no bar is displayed but no errors either.
# The game starts here.
label start:
screen sidebar:
frame:
has vbox
bar value stat range 100
# Show a background. This uses a placeholder by default, but you can
# add a file (named either "bg room.png" or "bg room.jpg") to the
# images directory to show it.
scene bg room
# This shows a character sprite. A placeholder is used, but you can
# replace it by adding a file named "eileen happy.png" to the images
# directory.
show eileen happy
# These display lines of dialogue.
"Hello, world."
a "You've created a new Ren'Py game."
a "Once you add a story, pictures, and music, you can release it to the world!"
# This ends the game.
return
i get the following errors if i put any bar code after label start as seen above
screen sidebar:<- screen expect a non-empty block
frame->: expected statement
all errors, where do i put code so it displays or is did i even code the bar right? help plz im new to ren'py
# The game starts here.
screen sidebar:
frame:
has vbox
bar value stat range 100
label start:
# Show a background. This uses a placeholder by default, but you can
# add a file (named either "bg room.png" or "bg room.jpg") to the
# images directory to show it.
scene bg room
# This shows a character sprite. A placeholder is used, but you can
# replace it by adding a file named "eileen happy.png" to the images
# directory.
show eileen happy
# These display lines of dialogue.
"Hello, world."
a "You've created a new Ren'Py game."
a "Once you add a story, pictures, and music, you can release it to the world!"
# This ends the game.
return
the above works but no bar is displayed but no errors either.
# The game starts here.
label start:
screen sidebar:
frame:
has vbox
bar value stat range 100
# Show a background. This uses a placeholder by default, but you can
# add a file (named either "bg room.png" or "bg room.jpg") to the
# images directory to show it.
scene bg room
# This shows a character sprite. A placeholder is used, but you can
# replace it by adding a file named "eileen happy.png" to the images
# directory.
show eileen happy
# These display lines of dialogue.
"Hello, world."
a "You've created a new Ren'Py game."
a "Once you add a story, pictures, and music, you can release it to the world!"
# This ends the game.
return
i get the following errors if i put any bar code after label start as seen above
screen sidebar:<- screen expect a non-empty block
frame->: expected statement
all errors, where do i put code so it displays or is did i even code the bar right? help plz im new to ren'py