Page 1 of 1

Local fade (transition)

Posted: Sun Jul 25, 2010 4:48 am
by Eliont
Pleas, how to do it?
When i use dissolve - all right, it affect only character sprite.
When fade - transition play fullscreen.

If use

Code: Select all

renpy.transition(Fade(0.5,0,0.5,widget=ui.image(ImageReference(unit[pointer].sprite),xpos=0.5,ypos=0.5))) 
at first sprite (without transparency) shown on left top corner, and only then - in center.

Re: Local fade (transition)

Posted: Sun Jul 25, 2010 7:00 am
by Jake
Eliont wrote:Pleas, how to do it?
When i use dissolve - all right, it affect only character sprite.
When fade - transition play fullscreen.
What exactly do you want to happen?

'Fade' is supposed to fade to black, then fade back in with the changes made. Like a scene change in a movie.

Do you want the individual sprite to fade to black, like a silhouette, and then go back to normal?

(If that's the case, I would say you should:
- create a new copy of your sprite which is all black, maybe by using im.MatrixColor and im.matrix.brightness with a brightness of -1 (most-dark)
- dissolve to your new dark sprite, then dissolve back to a normal sprite?)

Re: Local fade (transition)

Posted: Mon Jul 26, 2010 4:38 am
by Eliont
Thanks, exactly what i need.

Code: Select all

        renpy.transition(Dissolve(0.3))
        at_coords (unit[pointer].pos[0],unit[pointer].pos[1],0.5,1.0)
        ui.image(im.MatrixColor(ImageReference(unit[pointer].sprite),im.matrix.brightness(1)))
        ui.pausebehavior(0.3)
        ui.interact()
        renpy.transition(Dissolve(0.3))
        at_coords (unit[pointer].pos[0],unit[pointer].pos[1],0.5,1.0)
        ui.image(im.MatrixColor(ImageReference(unit[pointer].sprite),im.matrix.opacity(0)))     
        ui.pausebehavior(0.4)
        ui.interact()