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.
Hey folks! Been a long time since I messed around with Ren'py. I was wondering if there's a way to display an image whilst in the middle on a dialogue box without having to break it up? Perhaps adding code within the quotation marks that forms the what of a dialogue box? Sort of like this:
speaker "Sentence 1 /CALL TO SHOW IMAGE HERE AND WHEN IT'S LOADED, MOVE ON TO/ Sentence 2"
I figure maybe yes since you can add things like a wait call with {w}? But I also want to clarify that I'm not looking to add an image in the actual text, just a call to display/change an image outside of the textbox like how you normally would. Another way to do it that I can think of would be if you could close the current line, add the image, and then add new text to the dialogue box that is currently displaying? Sort of like this:
Oh extend is great and very close to what I wanted exactly. However, I tried both of your suggestions and in both cases the dialogue box flickers out of existence when it reaches that {nw} tag, and returns the moment the image begins to fade in, even though no "window hide" command has been called.
Edit: this is because of the dissolve; it wipes the full screen and takes the text-box with it, fading it back in before the second sentence commences
I'd like the image to show up at that point in the text regardless of the player's chosen text speed, so unless the text can create a signal that the ATL image timer can catch and run at, I think it's probably easier to somehow force the text box ignore the dissolve transition?
Further experimentation with this rather frustrating issue:
* The dialogue window is actually firmly in place; I just didn't see it because my background was black. Now that it's grey I can see I was wrong.
* Displayables like images or text outside of the dialogue window that were previously shown are in place and unaffected by the vanish+fadein.
The only thing that vanishes when calling show image is the text in the dialogue box, ie. Sentence 1! I just can't fathom how to keep it in place while the image fades in!
It's possible that using a layer specific dissolve will do what you're hoping. It will dissolve only the master layer leaving the screens layer (on which the say screen typically resides) unaffected.