Is there a way to use the "return" statement to return not to the point where the label was called, but to any other label? Alternatively, is there a way to remove the last call from the stack so I can just "jump" where I want to be?
Otherwise I need to use variables and do strange checks after the "call" statement, which I would like to avoid.
The reason why I don't use an ordinary "jump" in the first place is that the player can be sent from various places to various places and not all of them return to the exact point where the player came from.
"return" to specific label?
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.
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.
- Milkymalk
- Miko-Class Veteran
- Posts: 762
- Joined: Wed Nov 23, 2011 5:30 pm
- Completed: Don't Look (AGS game)
- Projects: KANPEKI! ★Perfect Play★
- Organization: Crappy White Wings
- Location: Germany
- Contact:
"return" to specific label?
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)
- Ocelot
- Lemma-Class Veteran
- Posts: 2446
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: "return" to specific label?
Code: Select all
label start:
call second
label second
$ renpy.pop_call()
jump ending
label ending:
return
< < insert Rick Cook quote here > >
- Milkymalk
- Miko-Class Veteran
- Posts: 762
- Joined: Wed Nov 23, 2011 5:30 pm
- Completed: Don't Look (AGS game)
- Projects: KANPEKI! ★Perfect Play★
- Organization: Crappy White Wings
- Location: Germany
- Contact:
Re: "return" to specific label?
Oh, thank you, that's handy!
I've been absent for a while so I probably missed a lot of little additions.
I've been absent for a while so I probably missed a lot of little additions.
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)
Who is online
Users browsing this forum: Bmac60506