"say" statement hangs game after renpy.jump() [SOLVED]

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
Milkymalk
Miko-Class Veteran
Posts: 752
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:

"say" statement hangs game after renpy.jump() [SOLVED]

#1 Post by Milkymalk » Mon Jun 08, 2015 8:33 pm

I have a problem with this. Let me first tell you what works:

Code: Select all

label rhythm_minigame:
    $ game = Rhythmgame([x+1 for x in range(8)], 5, 6, 90, 3.0, "gewonnen")
    show expression game.notemanager as rhythmusspiel
    show screen note_score(game)
    $ wait = ui.interact() 
    return
    
label gewonnen:
    hide screen note_score
    scene black with fade
    "gewonnen"
    $ del game
    return
And inside the spritemanager update function:

Code: Select all

renpy.jump(self.returnlabel) # self.returnlabel is "gewonnen"
So far, so good.

But when I do this (triggering a "say" statement first), the game hangs itself instead of doing anything:

Code: Select all

label gewonnen:
    "gewonnen"
    hide screen note_score
    scene black with fade
    $ del game
    return
What is the reason for this? Can I prevent that from happening so I can show dialogie before the game screen disappears?

EDIT:
I have a different minigame where it works, no problems:

Code: Select all

    $ game = Slider(0, "c2_slidertutorial_finished")
    show rahmen at topleft
    show expression game.tilemanager as schiebespiel
    show expression game.glowmanager as leuchten
    $ wait = ui.interact()
    
label c2_slidertutorial_finished:
    "test"
    scene bg corridor with fade         # "scene" hides all spritemanagers too
    $ del game
With the same "renpy.jump(self.returnlabel)" to jump to the label.

What other things could cause this behaviour? I did no other jumps or calls inside the loop.
Last edited by Milkymalk on Tue Jun 16, 2015 1:44 pm, edited 1 time in total.
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)

paktek123
Newbie
Posts: 13
Joined: Thu Jan 01, 2015 8:31 am
Completed: Raiser RPG Framework for Ren'Py
Github: paktek123
Contact:

Re: "say" statement hangs game after renpy.jump()

#2 Post by paktek123 » Sat Jun 13, 2015 12:23 pm

do you get same results if you use

Code: Select all

renpy.say
instead?

User avatar
PyTom
Ren'Py Creator
Posts: 15893
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: "say" statement hangs game after renpy.jump()

#3 Post by PyTom » Sat Jun 13, 2015 9:54 pm

Without replications, there's zero chance anyone can solve this. If I had to guess, the problem is likely that the spritemanager is going into some sort of loop during image prediction.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Milkymalk
Miko-Class Veteran
Posts: 752
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: "say" statement hangs game after renpy.jump()

#4 Post by Milkymalk » Tue Jun 16, 2015 12:46 pm

I solved the problem: I paused the minigame before the say statement so the update function is not called any more (more excatly, it returns immediately). That fixed it. Maybe the "say" statement just can't be the first thing to happen after the jump, I didn't try it.
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)

Post Reply

Who is online

Users browsing this forum: No registered users