I honestly cannot figure out what difference the restart_interaction thing is doing whether I turn it on or off but I'll just leave it there just in case I guess.
1. So I'm just supposed to type "scene onlayer screens" in place of every time I'd normally type "scene" when doing a transition? I just tried that, functionality is the same: dialogue box still isn't cleared when transitioning scenes. I double checked that everything is set up like you suggested (short of making a custom layer, but you implied it should still show results without that), no idea why it's not working.
Okay, once you told me the scene statement defaults to the master layer I was like "oh, okay, I'll just set it to be on the master layer instead of the screens layer", but this causes additional problems. The new functionality is as follows:
-The black narrator box I have now never goes away, overlapping other characters' boxes, tinting them black. It also doesn't go away when changing scenes.
-Other characters' boxes now properly go away when the scene is changed, and also go away when a new character/the narrator speaks. They still remain when a menu appears (but that part is fixed with your other suggestion).
Here's the code I'm using for the narrator character. I'm gonna be totally honest: I barely understand a single thing about any of why this is written the way it is and don't remember writing/finding it since it was so long ago.
Code: Select all
define narrator = Character(None,
callback=partial(chartextbg, "narrator"))
define generic = Character("generic",
callback=partial(chartextbg, "narrator"),
namebox_background = Frame("Generic_nbox", gui.namebox_borders, tile=gui.namebox_tile, xalign=gui.name_xalign))
(EDIT: Oh right, that second thing is for generic background characters and shouldn't really have anything to do with the narrator dialogue. Still no idea why the other characters are working but the narrator isn't. Only difference is it's set to "None", which I'm guessing it has to be for this to be read as the narrator?)
2. OKAY THANK YOU THANK YOU this seems to work for menus.
I had stared at that callback page for quite a while, actually, and have scoured the documentation trying to figure this stuff out. I only came here after my friends and I spent hours trying to figure this out with the documentation. I wasn't aware of the syntax needed for the 'on "show" action Function(renpy.hide)' stuff, or that it was even possible.
Oh, yeah, I'm not sure why it's named dialoguelayer, I guess when my partner and I wrote it we assumed that was how layers worked, or something? I dunno. I'll just change it to dialoguebox.
Here's what the custom dialogue box looks like. Every character has a different-colored one with different shapes like the little hearts in this one, and the whole thing slowly slides diagonally down left repeatedly to make it look like the shapes are infinitely scrolling by. The narrator's box is just solid blank.
I don't 100% remember why we didn't just alter the say screen, but I suspect it's because we found it too limiting? We need the box to have the following properties (though if this is possible with editing the say screen and you think it'd be easier, let me know):
-use a different image for each character
-don't redisplay the box when the same character says two lines in a row
That last point is why the whole code is set to only display a dialogue box when the speaking character changes. Otherwise, the scrolling animation awkwardly resets on every line of dialogue. (If there was some way to sort of have that animation consistently playing at all times even when a particular image goes away or is redisplayed, rather than restarting itself every time the image is displayed, that would improve a lot of things, but I dunno if that's possible.)
Okay, so, right now I only actually have two problems.
1. The narrator's box refuses to go away. I'm sure this is my fault and will TRY to look at the code I wrote for it but I'm not sure I'll understand what the problem is.
2. Because it's set up to only display a new image when a new character speaks...if I have Maddie say a line, then change the scene, then have her say a new line, her dialogue box on that new line doesn't appear. This is why I so badly wish I could just set it up to do things 'on "scene" action'. Is that really not possible? It feels like it should be but I don't know what the syntax might be. If I could do that in a similar way you helped me do it with the menu action, I could simply write:
"on scene action -> hide dialogue box -> set speaking character to None"
...and that would be that. Or if I could just edit the way the scene statement works, that'd work fine too.
Appreciate the help so far, though. Halfway there.