Fading Event

is there any script that makes an event fade when 'Erase Event' is executed on it? or a script is not needed and built-in functions can be used as a work around?
You can just use the change opacity move command and then erase command after you're done.


Naturally, this requires a lot of work, so I'd probably just write a snippet to do the opacity changing for me in a single loop.
Put the following into a new slot:

Spoiler
class Game_CharacterBase #-------------------------------------------------------------------------- # * Initialize Private Member Variables #-------------------------------------------------------------------------- alias shaz_char_opacity_game_characterbase_init_private_members init_private_members def init_private_members shaz_char_opacity_game_characterbase_init_private_members @opacity_target = @opacity @opacity_duration = 0 end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- alias shaz_char_opacity_game_characterbase_update update def update update_opacity shaz_char_opacity_game_characterbase_update end #-------------------------------------------------------------------------- # * Opacity Update #-------------------------------------------------------------------------- def update_opacity return if @opacity_duration == 0 d = @opacity_duration @opacity = (@opacity * (d - 1) + @opacity_target) / d @opacity_duration -= 1 end #-------------------------------------------------------------------------- # * Opacity Update #-------------------------------------------------------------------------- def change_opacity(opacity, duration) @opacity_target = opacity @opacity_duration = duration endend
Call it by saying:

target.change_opacity(0, #frames)where target is any of:$game_player

$game_map.events[id]

or whatever's needed to reference what you want to fade out.

and #frames is how many frames you want it to take.

You can also do it as a Script call via a move route:

Set Move Route (This Event): Script: change_opacity(0, #frames)This way gives you a smoother fadeout, without having to put a dozen <change opacity; wait> commands in a move route.
thank you very much =) let this topic be closed =)
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/fading-event.22300/