Status
Not open for further replies.

mahan

no lack of courage!
Veteran
Joined
Aug 23, 2013
Messages
94
Reaction score
8
First Language
English
Primarily Uses
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?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,877
First Language
English
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.
 
Last edited by a moderator:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,522
Reaction score
14,846
First Language
English
Primarily Uses
RMMV
Put the following into a new slot:

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.
 

mahan

no lack of courage!
Veteran
Joined
Aug 23, 2013
Messages
94
Reaction score
8
First Language
English
Primarily Uses
thank you very much =) let this topic be closed =)
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,522
Reaction score
14,846
First Language
English
Primarily Uses
RMMV
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.
 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

For a long time I always consider XP soundtracks as the best one.
Just listened to some of MZ tracks from the free version.
It's... Quite mindblowing. xD
Only listened to the battles, towns, and fields.
But I'm sure the rest are equally good. :D
What do you guys want to see for the new Jump into Javascript? A continuation of the rpg_objects, or would you prefer a "lesson 0" where I go back to the absolute basics of Javascript and cover the fundamentals of the language and its construction?
Hey RPG members!!

How do you finish projects? Some new game developers start off strong but end up losing momentum. What keeps you motivated while working on new projects?
Feeling wee sleepy.. ZzzZ
So many threads to move to the right place. My post count is awesome, but 95% of it is due to moving things.

Forum statistics

Threads
112,454
Messages
1,068,397
Members
146,114
Latest member
HeitorFull
Top