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.
As the subject said, i'm just started with renpy, i've learned alot trough youtube and google searches, but i can't seem to find out how to navigate rooms without the same dialogue "spawns" everytime.
For exempel:
You wake up, it says go to the kitchen, when you arrive at the kitchen for the first time, a dialogue pops, but when that ends i and i go out of the room and comeback, i want just the room.
label kitchen:
scene bg_kitchen
$ kitchenentered = "No"
if kitchenentered == "No":
show eileen happy at left with dissolve
e "Hello [mcname]"
hide eileen happy
show eileen happy happy at right with dissolve
m "Hello mom"
call screen bg_kitchen
screen bg_kitchen:
add "bg_kitchen"
imagebutton:
focus_mask True
idle "Kitchen/to_livingroom_idle.png"
hover "kitchen/to_livingroom_hover.png"
action Jump("upstairs")
Try to put all those '$ kitchenentered = "No"' outside of locations labels. For now every time game jumps to the kitchen label the 'kitchenentered' variable sets to 'No'.
# declare all the necessary variables using
# default statement
default kitchenentered = 'No'
label start:
"..."
jump kitchen
label kitchen:
scene bg_kitchen
if kitchenentered == "No":
# set new value for flag-variable
$ kitchenentered = "Yes" # <--- !!!
show eileen happy at left with dissolve
e "Hello [mcname]"
hide eileen happy
show eileen happy happy at right with dissolve
m "Hello mom"
call screen bg_kitchen
For simple "yes"/"no" flags you should learn about using booleans instead. Just use the values of True and False (case-sensitive!), it's much easier to test for them, too.
Try to put all those '$ kitchenentered = "No"' outside of locations labels. For now every time game jumps to the kitchen label the 'kitchenentered' variable sets to 'No'.
# declare all the necessary variables using
# default statement
default kitchenentered = 'No'
label start:
"..."
jump kitchen
label kitchen:
scene bg_kitchen
if kitchenentered == "No":
# set new value for flag-variable
$ kitchenentered = "Yes" # <--- !!!
show eileen happy at left with dissolve
e "Hello [mcname]"
hide eileen happy
show eileen happy happy at right with dissolve
m "Hello mom"
call screen bg_kitchen