[Solved] Jump somewhere without label or named menu?

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
Posts: 15
Joined: Wed Nov 20, 2019 3:19 pm

[Solved] Jump somewhere without label or named menu?

#1 Post by Rekoija » Thu Jun 11, 2020 4:01 pm

Sometimes I find myself thinking, dang, I really want to jump somewhere without having to make a completely new label for it (I like to collapse all my labels because I need to go back and forth in the script a lot) - Is there some way to do that?

I know I can make a menu, name it, and jump back to that, but if I make a named menu, I need to add a menu choice, which isn't exactly ideal for players.

Any help is appreciated, thanks in advance!
edit: typo

Aight, just realized I can name a menu, give a false variable to a single menu option, so it gets skipped automatically, but still, if there's a better solution, I'm all ears.
Last edited by Rekoija on Fri Jun 12, 2020 3:29 am, edited 1 time in total.

User avatar
Eileen-Class Veteran
Posts: 1481
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game

Re: Jump somewhere without label or named menu?

#2 Post by Remix » Thu Jun 11, 2020 7:45 pm

Not really sure what you need...
Why is a label not suitable? It sure is less to type than a menu...

If you wanted just a reference to a mid point in some label you could just create another label and (because Ren'Py is rather forgiving about label indentation) you can even indent it:

Code: Select all

label start:
    scene forest
    label mid_of_start:
    "Note: you cannot go back to being in label start though"
    # etc
label elsewhere:
    scene lakeside
    jump mid_of_start 
    # which would be showing lakeside
In general, you should be using lots of labels to break up your story. Remember that, should you use one, replays in a scene gallery can only start from named labels or menus.

You could also consider local labels, named with a dot at the start

Code: Select all

label start:
    label .mid:
    jump .mid ## jumps to start.mid as we are still within the scope of start
label finale:
    label .mid:
    "Yes we can use the same local name"
    jump .mid ## jumps to finale.mid
    jump start.mid ## jumps to start.mid by using the parent prefix
Final note: Adding in labels like this to existing scripts might need additional tweaks to any already complete translation
Frameworks & Scriptlets:

Post Reply

Who is online

Users browsing this forum: Bing [Bot]