'ui.jumps' Can not 'return' to their point of entry...

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
BrandonDeVITO
Newbie
Posts: 6
Joined: Wed Jan 23, 2013 12:09 pm
Completed: N/A
Projects: JUMPr (A Universe Jumping Android RPG)
Organization: 5|N Interactive
Contact:

'ui.jumps' Can not 'return' to their point of entry...

#1 Post by BrandonDeVITO »

Hey there. Small issue:

When I create the event:

Code: Select all

if KARMA == 0:
                ui.imagebutton("images/0.png", "images/0.png", clicked=ui.jumps("jumpr_menu"),xalign=0.0, yalign=0.0)
And later, in the jumpr_menu I use:

Code: Select all

    if result == "Girl1":
        if KARMA == 10:
            $ KARMA = 0
            $ GIRL = 1
            call JUMPR
        else:
            centered "{b}{color=8C0000}You have insufficient Karma to ♦JUMP♦ to Sakura's Variant...{/b}{/color}"
            return
The 'return' at the bottom is sending me back to the start of the game. I believe that this (correct me if I am mistaken) is a result of the fact that return is intended to be in response to a call, not a jump.

How do I change the initial 'clicked=' behavior to to a jump in order to make it so that when the menu is closed, I go back to the instant from whence the menu was called?

Thanks in advance for any advice you can offer.

User avatar
BrandonDeVITO
Newbie
Posts: 6
Joined: Wed Jan 23, 2013 12:09 pm
Completed: N/A
Projects: JUMPr (A Universe Jumping Android RPG)
Organization: 5|N Interactive
Contact:

Re: 'ui.jumps' Can not 'return' to their point of entry...

#2 Post by BrandonDeVITO »

Found it! ui.callsinnewcontext in place of ui.jumps does the trick! Huzzah!

It's this multiple data source thing. Most of the information is there. It's just not unilaterally distributed!

I would love to have a predictive interpreter for Ren'py...

Thanks for anyone who went out looking for a solution for me.

User avatar
tiya_nofurita
Miko-Class Veteran
Posts: 669
Joined: Fri Jun 22, 2012 7:23 pm
Completed: ALLBLACK Phase 1, Heart's Blight, Last Rx., EDDA Cafe, Kohana, Half Moon
Projects: ALLBLACK Phase 2
Organization: VN Project Indonesia
Deviantart: SECONDARY-TARGET
itch: NSAID
Location: I can be everywhere
Discord: 3,4-Methylendioxymethamphetamine#4886
Contact:

Re: 'ui.jumps' Can not 'return' to their point of entry...

#3 Post by tiya_nofurita »

hey, can you give me the exact code how to jump to main menu? it seems ui.jumps only works on "labels"...
Webtoon

"For what reason I live?"
Image

---
Completed project:


"What will you see when you are dead?"

Image

MY VISUAL NOVEL

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: 'ui.jumps' Can not 'return' to their point of entry...

#4 Post by xela »

Necromancy! :)

Code: Select all

ui.jumps("_main_menu")
could work or something like:

Code: Select all

ui.jumps("_main_menu_prompt")
but it's generally not a good idea to do this (why not use menu screens instead?).
Like what we're doing? Support us at:
Image

User avatar
tiya_nofurita
Miko-Class Veteran
Posts: 669
Joined: Fri Jun 22, 2012 7:23 pm
Completed: ALLBLACK Phase 1, Heart's Blight, Last Rx., EDDA Cafe, Kohana, Half Moon
Projects: ALLBLACK Phase 2
Organization: VN Project Indonesia
Deviantart: SECONDARY-TARGET
itch: NSAID
Location: I can be everywhere
Discord: 3,4-Methylendioxymethamphetamine#4886
Contact:

Re: 'ui.jumps' Can not 'return' to their point of entry...

#5 Post by tiya_nofurita »

xela wrote:Necromancy! :)

Code: Select all

ui.jumps("_main_menu")
could work or something like:

Code: Select all

ui.jumps("_main_menu_prompt")
but it's generally not a good idea to do this (why not use menu screens instead?).
Hey thanks, it works :D
I think ui.jumps can't go along with menu screens...I have tried and it didn't work.
Webtoon

"For what reason I live?"
Image

---
Completed project:


"What will you see when you are dead?"

Image

MY VISUAL NOVEL

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], decocloud, Google [Bot], thexerox123