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.
##blah blah
$ upstairs_done = False
label kitchen:
#imagemap statement
#a long "if result ==" statement goes here
elif result == "Upstairs":
if upstairs_done == False:
$upstairs_done == True
jump upstairs
if upstairs_done == True:
#scene changes
jump bedroom
else:
#scene changes
jump bedroom
#more stuff
label upstairs:
#scene changes
jump bedroom
label bedroom:
#the bedroom then eventually can lead back to the kitchen to do everything again
Here's the issue: When the user is playing, once they go upstairs for the first time they go directly to "label upstairs" (which is supposed to happen). Once that is done, the user can return to the kitchen and then go upstairs again. What should happen then after the user has already been upstairs, is the user should skip over "label upstairs" and be taken directly to "label bedroom", but instead the user is being taken through "label upstairs" again and not going directly to "label bedroom". What's causing this?
P.S: I added the "else" statement to see if that would fix it, but it didn't work.
Projects: Alone- (Horror/Sci-Fi) Complete! Link Demokratiya- (Adventure/Action) I'm kind of winging it with this one. Goal is 100,000 words. Yeah, it's gonna take a while. {Last worked on Sept/28 : Word count (coding and all) ~4500}
It seems like you're trying to set upstairs_done to True here, but instead are doing a boolean evaluation using ==, which won't change the value of upstairs_done. You'd want to change this to =
I knew it had to be something small I was missing! Can't believe I missed that! Thank you :]
Projects: Alone- (Horror/Sci-Fi) Complete! Link Demokratiya- (Adventure/Action) I'm kind of winging it with this one. Goal is 100,000 words. Yeah, it's gonna take a while. {Last worked on Sept/28 : Word count (coding and all) ~4500}