Jumping to previous scene?

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.
Post Reply
Message
Author
User avatar
warmsundae
Regular
Posts: 61
Joined: Tue Feb 24, 2015 9:51 pm
Skype: electriclan
Soundcloud: lanterny
Location: korea
Contact:

Jumping to previous scene?

#1 Post by warmsundae » Mon Jan 25, 2016 12:33 am

This is my situation.

Code: Select all

label room1:
    e "This is room 1."
    
menu:
    e "Move on to room 2?"
    
    "I'd like to quickly visit room A.":
        jump roomA
        
    "Move on.":
        jump room2
        
label room2:
    e "This is room 2."
    
menu:
    e "Move on to room 3?"
    
    "I'd like to quickly visit room A.":
        jump room A
        
    "Move on.":
        jump room3
        
label roomA:
    e "This is room A."
    e "It can't be 'moved on' to, but it CAN be quickly visited from any room."
    jump ...
    # and it would be convenient here to be able to go back to a previous room visited.
    # I've considered just using variables for each label, but there's got to be an easier way.
  
return
Now, I don't know anything about coding outside the script file except for a little bit of screen language, and I don't really know where to start. But is there a way to make a shortcut like this?

philat
Eileen-Class Veteran
Posts: 1853
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Jumping to previous scene?

#2 Post by philat » Mon Jan 25, 2016 12:41 am

warmsundae wrote:Now, I don't know anything about coding outside the script file except for a little bit of screen language, and I don't really know where to start.
The documentation seems like a decent place to start...? http://www.renpy.org/doc/html/label.html#call-statement

User avatar
mobychan
Veteran
Posts: 275
Joined: Fri Apr 24, 2015 6:31 am
Projects: The Chosen - Sakura Pink & Gentian Blue
Organization: Foresoft
Location: Germany
Contact:

Re: Jumping to previous scene?

#3 Post by mobychan » Mon Jan 25, 2016 3:11 am

Also take a good look at your indentation.
Menus and return statements should be inside the labels, so all of that stuff has to be indented 4 more spaces

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Ocelot, zyric