Showing Screens?

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
Empish
Veteran
Posts: 221
Joined: Thu Jan 14, 2016 9:52 pm
Projects: Efemural Hearts, It Ends With Graduation
itch: empish
Contact:

Showing Screens?

#1 Post by Empish »

Hallo, all. I am a Ren'Py newbie and am trying to figure out screens so I can add mini-game functionality to my game.

I'm using the mini-games tutorial here: http://lemmasoft.renai.us/forums/viewto ... 34#p243934 specifically on the fifteen-game one.

When I copied that code into a new project it worked beautifully after I disabled the image stuff. However, when I try to make my own screen (which is a seriously reduced version with disabled buttons) and say "show screen griddle" (name of my screen) nothing ends up happening. I put a simple dialogue code the line before that to ensure it was getting called, and that works fine, but after I click past that when running the game it just ends the whole thing and goes back to the start menu.

Is it a problem with my screen, that it's not showing properly, or am I not invoking it correctly?

My screen:

Code: Select all

screen griddle:
    frame:
        xalign 0.5 yalign 0.5
        background Solid("#ccc") 
        
    grid w h spacing 0:
        for every_tile in tiles_list:
            button: 
                xminimum 70 xmaximum 70
                yminimum 70 ymaximum 70
                background Solid("#fff")
                text str(every_tile["tile_number"]) xalign 0.5 yalign 0.5
                
                action Jump("show_clicked")
I still have to code to create and initialize w, h, and tiles_list, so I don't think it's that, but I can't really figure out what the problem is, especially since I'm getting a silent fail and no error messages.

philat
Eileen-Class Veteran
Posts: 1909
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Showing Screens?

#2 Post by philat »

If it's returning to the main menu, that probably means there's no dialogue AFTER you show the screen. show screen does not wait for an interaction. Try putting a line of dialogue after the show screen, or try call screen (which does wait). I don't know what kind of game logic you want so I can't be more specific than that.

User avatar
Empish
Veteran
Posts: 221
Joined: Thu Jan 14, 2016 9:52 pm
Projects: Efemural Hearts, It Ends With Graduation
itch: empish
Contact:

Re: Showing Screens?

#3 Post by Empish »

I see. Thank you so much, that fixes it. It's not right yet, but it's at least showing up. : D Now I can work with this.

Post Reply

Who is online

Users browsing this forum: BBN_VN, Bing [Bot]