I have a question regarding ui.jumps
Let's say I made a label called "ch1_part1". Now, normally, if I want to jump back to that label, I only need to simply write:
jump ch1_part1
However, what if I want to make a function that allows me to jump to any label I like as long as I call it by passing in a string as an argument, with the string holding the name of the label? Inside the function, I wrote:
$ location = "ch1_part1"
$ ui.jumps(location)
I thought that would work, but it looks like Renpy skips over ui.jumps and continue with the script.
Any help would be appreciated. Thanks in advance.
A question on ui.jumps
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.
-
- Newbie
- Posts: 16
- Joined: Thu Nov 16, 2006 2:10 pm
- Contact:
A question on ui.jumps
"Darker than a moonless night, hotter and more bitter than hell itself. That is coffee." --- Godot, Phoenix Wright Ace Attorney: Trials and Tribulations
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: A question on ui.jumps
You want to use renpy.jump, rather than ui.jumps. The former immediately jumps, while the latter returns an object that, when called, jumps.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
-
- Newbie
- Posts: 16
- Joined: Thu Nov 16, 2006 2:10 pm
- Contact:
Re: A question on ui.jumps
Thanks for the quick reply, PyTom
"Darker than a moonless night, hotter and more bitter than hell itself. That is coffee." --- Godot, Phoenix Wright Ace Attorney: Trials and Tribulations
Who is online
Users browsing this forum: Dark79, Google [Bot], Majestic-12 [Bot]