[Solved] fading effect starting from the top?
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.
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.
[Solved] fading effect starting from the top?
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 don't know if this even possible in renpy, otherwise id have to animate frame by frame the thing and its a pain.
Last edited by Dr_arell on Thu Sep 17, 2020 12:03 pm, edited 1 time in total.
Re: fading effect starting from the top?
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)?
For the first one check the docs for ATL - https://www.renpy.org/doc/html/atl.html and tutorial game.
For the second - this thread - viewtopic.php?f=52&t=49804&p=484899&hil ... ve#p484899
Do you need a laser beam image to move over the screen? Or custom fade transition to change images (backgrounds and sprites)?
For the first one check the docs for ATL - https://www.renpy.org/doc/html/atl.html and tutorial game.
For the second - this thread - viewtopic.php?f=52&t=49804&p=484899&hil ... ve#p484899
Re: fading effect starting from the top?
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
ill test that out thank you
-
afrikanwizard
- Newbie
- Posts: 21
- Joined: Tue Nov 19, 2019 3:41 pm
- Completed: Edge of Darkness - Volume 1: The Old Man
- Contact:
Re: fading effect starting from the top?
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.

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'.
I think 'TR19.png' would suit your needs adequately here.

Code: Select all
define shoot = ImageDissolve("TR19.png", 0.2, 8)
show laser with shoot
pause 0.5By 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'.
- Per K Grok
- Miko-Class Veteran
- Posts: 882
- Joined: Fri May 18, 2018 1:02 am
- Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
- itch: per-k-grok
- Location: Sverige
- Contact:
Re: fading effect starting from the top?
Dr_arell wrote: ↑Mon Sep 14, 2020 11:56 amhi, 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
Code: Select all
transform wipeDown:
crop_relative True
crop (0.0, 0.0, 1.0, 0.0)
alpha 0.2
linear 1.0 alpha 1.0 crop(0.0, 0.0, 1.0, 1.0)
Code: Select all
show stars with dissolve:
pos(211, 233)
show sbShadow at wipeDown behind stars:
pos(260, 1)
Who is online
Users browsing this forum: Ocelot