How do you dissolve a side image..?

Use this forum to help develop your game-making skills, and get feedback on writing, art, music, or anything else you've created that isn't attached to a game in progress.
Locked
Message
Author
playswithtribbles
Regular
Posts: 82
Joined: Tue Sep 22, 2009 2:29 pm
Projects: 'Paths of Twilight' A Fantasy GxB game with a RPG flavor. Sprites: 18% Script: 35-38% BGs: 18% Music: 100%
Location: Kashyyyk
Contact:

How do you dissolve a side image..?

#1 Post by playswithtribbles »

Does anyone know how to make a character side image (the pic that shows up next to the text on the bottom) dissolve in every time it appears? I don't like the sudden jolting change from expression to expression. (I want it kind of like the way Yo Jin Bo did it, if you know what I'm talking about...)

Here's a basic code of what I'm using now:

Code: Select all

    $ l = Character("Person",
                        color="808080",
                        window_left_padding=160,
                        show_side_image=Image("personexpression1.png", xalign=0.0, yalign=1.0))
Thanks in advance. :twisted:

Oops..! (Wrong emoticon) I mean: :P
-Dark Helmet-"And so you see Lonestar, that evil will always triumph! Because good is dumb."

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: How do you dissolve a side image..?

#2 Post by Aleema »

Having the images dissolve will make the text box disappear while it does it's transition. That would be more jolting, trust me. =P
But, to answer your question, it's not possible (I don't think) in the way that you're doing it. You'd have to make the side images separate from the characters, put them on the overlay layer, and then manually hide/show them. That's a lot of trouble, sorry.

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: How do you dissolve a side image..?

#3 Post by Jake »

playswithtribbles wrote:Does anyone know how to make a character side image (the pic that shows up next to the text on the bottom) dissolve in every time it appears?
I'm not sure it'll work, it's untested, but one thing you could try would be defining each of your side images as an ATL image that dissolves in, something like:

Code: Select all

  image side bob smile:
    "bob_side_smile.png" with Dissolve(0.5, alpha=True)
  $ bs = Character("Bob", show_side_image="side bob smile")
- I'm thinking that with a bit of luck (I've not checked) the side-image will be shown with the same tag all the time, meaning that this will naturally dissolve the old one out of the way. It could also be worth making sure that the first part of the image name is the same for all side images, since that's what's used to determine if there's already an image drawn that's supposed to be replaced.


Now, the above quite possibly won't work, depending on how the side-image stuff is implemented. As a not-quite-the-same-but-maybe-better-than-nothing alternative, you could try building the dissolve effect into the image itself with ATL manipulation of alpha:

Code: Select all

  image side bob smile:
    on show:
        alpha 0.0
        linear .5 alpha 1.0
     on hide:
        linear .5 alpha 0.0
- that produces an image that - when shown - fades in from nothing over the course of 0.5 seconds, and when hidden, fades out again over 0.5 seconds. Again, I've not tested it (I don't have the chance to run Ren'Py right now) but I would hope that when the image is hidden, the ATL kicks off but Ren'Py immediately moves on to the next thing to do - in this case, showing the next side image - so you'd see one fading out and one fading in at the same time. Which - if it works - isn't quite the same as a dissolve, but it's pretty close and I doubt most people would notice the difference in half a second.

Aleema wrote:Having the images dissolve will make the text box disappear while it does it's transition. That would be more jolting, trust me. =P
If you check this cookbook recipe, it suggests you can keep the window shown during transitions just by setting 'store._window_during_transitions' to True. This is what I did with Each Uisge, and for the most part it seemed to work fine.

(The caveat would be that the window would continue to be shown through all other kinds of transitions, for example when changing scene, but personally I don't think that's a bad thing.)
Server error: user 'Jake' not found

Locked

Who is online

Users browsing this forum: No registered users