RPG Maker Forums

I need a math equation that will give me an opacity given that a transition is already in progress.  Usually I use the following method for transitions.


@opacity_target = arg1


@opacity_duration = arg2


Then apply the following code each frame during the transition:


@opacity = (@opacity * (@opacity_duration - 1) + @opacity) / @opacity_duration


That works fine as long as I start the transition while on that map.  But I need to start that kind of a transition while not on that map, then determine the value of the opacity mid way through the transition.  I do not remember all the algebra formulas from high school any more.  I can also store more variables if needed.  What is the formula to do that?


(Mods: please move where most appropriate if needed)

Latest Threads

Latest Profile Posts

Frostorm wrote on Featherbrain's profile.
Hey, so what species are your raptors? Any of these?
... so here's my main characters running around inside "Headspace", a place people use as a safe place away from anxious/panic related thinking.
Stream will be live shortly! I will be doing some music tonight! Feel free to drop by!
Made transition effects for going inside or outside using zoom, pixi filter, and a shutter effect
I have gathered enough feedback from a few selected people. But it is still available if you want to sign up https://forums.rpgmakerweb.com/index.php?threads/looking-for-testers-a-closed-tech-demo.130774/

Forum statistics

Threads
105,992
Messages
1,018,189
Members
137,771
Latest member
evoque
Top