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.
-
Chiligoat
- Regular
- Posts: 31
- Joined: Thu Mar 21, 2019 7:42 pm
- Projects: Witches 4 Hire
- Location: Sweden
-
Contact:
#1
Post
by Chiligoat » Sun Apr 11, 2021 5:19 pm
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:
Code: Select all
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:
Code: Select all
speaker "Sentence 1" RETAIN THIS WINDOW
show image with dissolve
speaker "Sentence 2" ADDED TO THE ABOVE WINDOW
Suggestions? Obvious commands I'm overlooking?
Last edited by
Chiligoat on Sat Apr 17, 2021 11:41 am, edited 1 time in total.
-
Chiligoat
- Regular
- Posts: 31
- Joined: Thu Mar 21, 2019 7:42 pm
- Projects: Witches 4 Hire
- Location: Sweden
-
Contact:
#3
Post
by Chiligoat » Sun Apr 11, 2021 5:54 pm
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
-
Imperf3kt
- Lemma-Class Veteran
- Posts: 3636
- Joined: Mon Dec 14, 2015 5:05 am
- Location: Your monitor
-
Contact:
#4
Post
by Imperf3kt » Sun Apr 11, 2021 6:33 pm
Create an ATL image with a delay and show it before your sentence?
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project:
GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
-
Chiligoat
- Regular
- Posts: 31
- Joined: Thu Mar 21, 2019 7:42 pm
- Projects: Witches 4 Hire
- Location: Sweden
-
Contact:
#5
Post
by Chiligoat » Sun Apr 11, 2021 6:42 pm
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?
-
Chiligoat
- Regular
- Posts: 31
- Joined: Thu Mar 21, 2019 7:42 pm
- Projects: Witches 4 Hire
- Location: Sweden
-
Contact:
#6
Post
by Chiligoat » Mon Apr 12, 2021 9:38 am
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!
-
strayerror
- Regular
- Posts: 154
- Joined: Fri Jan 04, 2019 3:44 pm
-
Contact:
#7
Post
by strayerror » Wed Apr 14, 2021 8:45 pm
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.
Code: Select all
speaker "sentence 1{nw}"
show image with {'master': dissolve}
extend "sentence 2"
-
Chiligoat
- Regular
- Posts: 31
- Joined: Thu Mar 21, 2019 7:42 pm
- Projects: Witches 4 Hire
- Location: Sweden
-
Contact:
#8
Post
by Chiligoat » Sat Apr 17, 2021 11:40 am
Yes, this worked perfectly! Thank you so much; I didn't know you could define layers like this :>
-
Imperf3kt
- Lemma-Class Veteran
- Posts: 3636
- Joined: Mon Dec 14, 2015 5:05 am
- Location: Your monitor
-
Contact:
#9
Post
by Imperf3kt » Tue Apr 20, 2021 9:23 pm
Something that didn't occur to me before, are you using window auto or window show?
I believe the default setting (in options.rpy) is set to auto.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project:
GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
Users browsing this forum: Bing [Bot], Google [Bot]