[Solved] How to keep a called screen showing after its imagebutton jumps, without breaking say?

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
henvu50
Veteran
Posts: 337
Joined: Wed Aug 22, 2018 1:22 am
Contact:

[Solved] How to keep a called screen showing after its imagebutton jumps, without breaking say?

#1 Post by henvu50 »

edit| I figured it out. I'm being stupid again, I can't think in Ren'py yet, but I'm getting there. I modfied the code. All I had to do was just show a background image. *facepalm*

Code: Select all

label start:

     image bg background50 = "background.png"
     scene bg background50 

     jump gameLoop
     return
     
label gameLoop:

     call screen ihatescreens
     return
     
screen ihatescreens():
    modal True
    # add "background.png"
    imagebutton auto "i_%s.png":
          focus_mask True
          action Jump ("test001")
          
label test001:
    #no one told you to go away
    #show screen again, *sigh*
    #show screen ihatescreens

    # this gets shown
    say "bla bla bla" 

    # this gets shown
    say "fdfadf"
    
    # go back to the game loop so the user can choose from a variety of imagebuttons, always returning to that screen
    jump gameLoop
The above basic framework took me 27 hours to figure out. This is TERRIBLE. Absolutely terrible.

This functionality is extremely popular among Ren'py games, but this basic bare bone framework doesn't exist anywhere. I tried and tried searching for it on the forum.

Post Reply

Who is online

Users browsing this forum: Google [Bot]