Page 1 of 2

[SOLVED!!] Prevent dialogue disappearing during sprite transition?

Posted: Sat Jan 05, 2019 4:13 am
by Offworlder
I've been trying for ages to find a solution to this issue, but I've thus far come up empty.
Basically, I want to switch sprites mid-dialogue and use the dissolve transition when doing so.

With the "{nw}" and "extend" tags, getting the sprite to switch automatically within the same line of dialogue is no problem. However, unless I don't use the dissolve transition when switching sprites, the dialogue disappears during the switch.

Is there some way around this? I don't want to be inconsistent by having one or two places where expression changes don't have transitions, and I don't want to ruin the effect I'm going for by having the dialogue disappear partway through. >_<

Here's the code I'm using:

Code: Select all

show neth b1 with dissolve
n2 "{i}d{w=0.1}e{w=0.1}e{w=0.1}p{w=0.1}{nw} "
show neth b2 with dissolve
extend "b{w=0.1}r{w=0.1}e{w=0.1}a{w=0.1}t{w=0.1}h{/i}"
Any and all help is greatly appreciated!

Re: Prevent dialogue disappearing during sprite transition?

Posted: Sat Jan 05, 2019 5:50 am
by IrinaLazareva
try

Code: Select all

define mydis = { "master" : Dissolve(1.0) }

Code: Select all

show neth b1 with dissolve
n2 "{i}d{w=0.1}e{w=0.1}e{w=0.1}p{w=0.1}{nw} "
show neth b2 with mydis
extend "b{w=0.1}r{w=0.1}e{w=0.1}a{w=0.1}t{w=0.1}h{/i}"
https://renpy.org/doc/html/transitions. ... ransitions

Re: Prevent dialogue disappearing during sprite transition?

Posted: Sat Jan 05, 2019 6:19 am
by Offworlder
IrinaLazareva wrote: Sat Jan 05, 2019 5:50 am try

Code: Select all

define mydis = { "master" : Dissolve(1.0) }

Code: Select all

show neth b1 with dissolve
n2 "{i}d{w=0.1}e{w=0.1}e{w=0.1}p{w=0.1}{nw} "
show neth b2 with mydis
extend "b{w=0.1}r{w=0.1}e{w=0.1}a{w=0.1}t{w=0.1}h{/i}"
https://renpy.org/doc/html/transitions. ... ransitions
I've actually already tried this method. D:
It behaves as though there's no transition at all, so it just jumps straight from one sprite to the other while ignoring the "mydis" aspect.

Re: Prevent dialogue disappearing during sprite transition?

Posted: Sun Jan 06, 2019 8:59 pm
by IrinaLazareva
Strange... It is work for me. Anyway,
Alex wrote:ATL transforms should be the answer.
viewtopic.php?f=8&t=14823#p193210 (there are other problem, but the same decision)

Re: Prevent dialogue disappearing during sprite transition?

Posted: Sun Jan 06, 2019 10:18 pm
by lacticacid
Copy and paste the dialogue you had to after the transition with the {fast} tag after it, maybe? It worked out fine for me.

Re: Prevent dialogue disappearing during sprite transition?

Posted: Sun Jan 06, 2019 10:38 pm
by Offworlder
IrinaLazareva wrote: Sun Jan 06, 2019 8:59 pm Strange... It is work for me. Anyway,
Alex wrote:ATL transforms should be the answer.
viewtopic.php?f=8&t=14823#p193210 (there are other problem, but the same decision)
Using the suggested ATL transform does prevent dialogue from disappearing, but now there's a different issue. D:
Rather than just an expression change, the entire sprite disappears before the transition/transform begins, then fades back in.

It's possible I just don't understand how the transform works, but I've tried changing all the numbers and nothing seems to stop that from happening.

Re: Prevent dialogue disappearing during sprite transition?

Posted: Sun Jan 06, 2019 10:42 pm
by Offworlder
lacticacid wrote: Sun Jan 06, 2019 10:18 pm Copy and paste the dialogue you had to after the transition with the {fast} tag after it, maybe? It worked out fine for me.
I'm not sure I understand your suggestion. I apologize for my confusion!

Re: Prevent dialogue disappearing during sprite transition?

Posted: Mon Jan 07, 2019 5:53 am
by IrinaLazareva
Offworlder wrote: Sun Jan 06, 2019 10:38 pm It's possible I just don't understand how the transform works, but I've tried changing all the numbers and nothing seems to stop that from happening.
May be this will help to understand ATL viewtopic.php?f=51&t=16604

And then, here another interesting example
viewtopic.php?f=51&t=29064#p345408

Re: Prevent dialogue disappearing during sprite transition?

Posted: Mon Jan 07, 2019 7:30 am
by lacticacid
Offworlder wrote: Sun Jan 06, 2019 10:42 pm
lacticacid wrote: Sun Jan 06, 2019 10:18 pm Copy and paste the dialogue you had to after the transition with the {fast} tag after it, maybe? It worked out fine for me.
I'm not sure I understand your suggestion. I apologize for my confusion!

Code: Select all

e "Example text."
hide eileen with dissolve
e "Example text.{fast}"
The {fast} tag makes the text before it appear instantly, so it would look like it never disappeared in the first place.
You could also to this

Code: Select all

e "Example text.{nw}"
hide eileen with dissolve
e "Example text.{fast} More text."
to make the transition appear to happen in the middle of the text. This should work, I think. I apologize if it doesn't.

Re: Prevent dialogue disappearing during sprite transition?

Posted: Mon Jan 07, 2019 8:41 am
by Offworlder
lacticacid wrote: Mon Jan 07, 2019 7:30 am

Code: Select all

e "Example text."
hide eileen with dissolve
e "Example text.{fast}"
The {fast} tag makes the text before it appear instantly, so it would look like it never disappeared in the first place.
You could also to this

Code: Select all

e "Example text.{nw}"
hide eileen with dissolve
e "Example text.{fast} More text."
to make the transition appear to happen in the middle of the text. This should work, I think. I apologize if it doesn't.
Unfortunately, using the "{fast}" tag instead of the "extend" tag doesn't prevent text from disappearing while the transition is happening. I still appreciate your help, even if it didn't quite work out!
I'm wanting to show a new sprite rather than hide one, by the way.

Re: Prevent dialogue disappearing during sprite transition?

Posted: Mon Jan 07, 2019 8:53 am
by Offworlder
IrinaLazareva wrote: Mon Jan 07, 2019 5:53 am
Offworlder wrote: Sun Jan 06, 2019 10:38 pm It's possible I just don't understand how the transform works, but I've tried changing all the numbers and nothing seems to stop that from happening.
May be this will help to understand ATL viewtopic.php?f=51&t=16604

And then, here another interesting example
viewtopic.php?f=51&t=29064#p345408
These topics definitely look super useful, but the suggestions they give seem pretty specific and quite a bit more complicated than what I'm trying to do. D:
It's probably because I'm so inexperienced, but I can't figure out how to adapt their suggestions into a basic dissolve transition/expression change.

Re: Prevent dialogue disappearing during sprite transition?

Posted: Mon Jan 07, 2019 10:41 am
by mitoky
Ok so it is a bit of a work around, but should work.
First, add a second seperate sprite of neth b2 and name it something diffrent so it does not replace the tag.
Example: If your case name the sprite neth2 or so.

Either way then add these 2 transforms:

Code: Select all

transform custom_hide:
    pause 0.5
    alpha 1.0
    linear 0.5 alpha 0.0

transform custom_show:
    alpha 0.0
    linear 0.5 alpha 1.0
In the script then do as following:

Code: Select all

show neth b1 with dissolve
n2 "{i}d{w=0.1}e{w=0.1}e{w=0.1}p{w=0.1}{nw} "
show neth b1 at custom_hide
show neth1 at custom_show, middle # or whatever the position is, simply change middle into what applies.
extend "b{w=0.1}r{w=0.1}e{w=0.1}a{w=0.1}t{w=0.1}h{/i}"
And the next time the expression changes do this:

Code: Select all

## b3 only example, add whatever expression should appear now.
show neth b3:
    alpha 1.0   
hide neth1    
with dissolve
Basically neth1 is a dummy. While neth1 shows, neth waits and then gets invisible. And later on when we change the expression again, we simply have neth become visible again with his new expression and dissolve "in" while neth1 hides while dissolving out. So swapping back seemlessly.

From what i tested, this works and there should be no transparent iimages etc. If there is anyhting wrong, let me know!

Re: Prevent dialogue disappearing during sprite transition?

Posted: Mon Jan 07, 2019 11:11 am
by Offworlder
mitoky wrote: Mon Jan 07, 2019 10:41 am From what i tested, this works and there should be no transparent iimages etc. If there is anyhting wrong, let me know!
I've thus far tried the first two codes, but I'm encountering the same issue I did with the other transform posted here. The text doesn't disappear (which is good), but the sprite does. Right at the start of the transition/transform, the entire sprite vanishes, then fades back in.

I would definitely appreciate if you have any suggestions for why this might be!

Re: Prevent dialogue disappearing during sprite transition?

Posted: Mon Jan 07, 2019 11:26 am
by IrinaLazareva
Last try

Code: Select all

transform mydissolve(a=2):
    on show:
        alpha 0.0
        linear a alpha 1.0
    on hide:
        alpha 1.0
        linear a alpha 0.0
    on replaced:
        alpha 1.0
        linear a alpha 0.0
    on replace:
        alpha 0.0
        linear a alpha 1.0
        
label start:
    '?'
    show neth b1 at mydissolve(.5), center
    "{i}d{w=0.1}e{w=0.1}e{w=0.1}p{w=0.1}{nw} "
    show neth b2 at mydissolve(1)
    extend "b{w=0.1}r{w=0.1}e{w=0.1}a{w=0.1}t{w=0.1}h{/i}"

Re: Prevent dialogue disappearing during sprite transition?

Posted: Mon Jan 07, 2019 11:51 am
by Offworlder
IrinaLazareva wrote: Mon Jan 07, 2019 11:26 am Last try
Still no luck, sadly. :(
With the first transition, the entire sprite disappears before fading back in. With the second transition, the entire sprite partially fades out, then fades back in.