hi, i need to do a fading effect for a static image, a laser, and i need it to start from the top, so it gives the impression the laser is actually coming out.
i don't know if this even possible in renpy, otherwise id have to animate frame by frame the thing and its a pain.
Re: fading effect starting from the top?
Posted: Mon Sep 14, 2020 2:11 pm
by Alex
Not quite understand what you want to achieve...
Do you need a laser beam image to move over the screen? Or custom fade transition to change images (backgrounds and sprites)?
more like the second one, i got a laser beam.png, just the laser, i dont need it to move, what i want it to do is to load it from the top part to the bottom, the best example i can think of to explain is the jedi laser sable activation, it stars from the bottom til it reaches the top.
ill test that out thank you
Re: fading effect starting from the top?
Posted: Tue Sep 15, 2020 8:51 am
by afrikanwizard
For me, with my limited knowledge of Ren'Py, the easiest solution would be to use one of Kirikiri's .png files for a dissolve effect. I coded something similar to what I think you're trying to achieve last night for the sequel to my VN, except the 'beam' image was a full background picture rather than a .png file with transparency to overlay on a background. But there is little difference between the two.
I think 'TR19.png' would suit your needs adequately here.
define shoot = ImageDissolve("TR19.png", 0.2, 8)
show laser with shoot
pause 0.5
By trial and error I found that, for my tastes, shots, beams, slashes and punches effects on a 1024x768 resolution should have the speed of the dissolve effect (the first number on the 'define' command) should be between 0.15 and 0.25. While the pause after the dissolve should be set between 0.25 and 0.5.
If you have sound file to go with the laser 'shooting' just place the command to play it before the code for the graphic effect. And you can fiddle with the speed of the transition and the after-pause lenght to make the sound fit the 'animation'.
hi, i need to do a fading effect for a static image, a laser, and i need it to start from the top, so it gives the impression the laser is actually coming out.
i don't know if this even possible in renpy, otherwise id have to animate frame by frame the thing and its a pain.
I did something that might be similar to what you are looking for using crop in a game a bit back in time