Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Hobbes on Wed 28/07/2021 08:17:00

Title: Change speed of SetNextScreenTransition?
Post by: Hobbes on Wed 28/07/2021 08:17:00
Hi all,

Quick one - is it possible to easily slow down a screen transition? I know how to do it with Fading Out, but I'd like to slow down eTransitionDissolve for one particular scene.

Is there an option to set the speed for this single instance, which I call with SetNextScreenTransition?

As always, thank you again!!
Title: Re: Change speed of SetNextScreenTransition?
Post by: Crimson Wizard on Wed 28/07/2021 10:33:15
No, but the best option is to script your own transition.

This is done by setting transition type to "instant", and then scripting fade in/out effect.

The effect itself may be achieved by couple of ways.
1) Call FadeOut function in room leave event and FadeIn in room "after fade in" event (note that since transition is "instant" there's no fade, but this is still a formally correct event to do your own animations, because "room load" event is not meant for blocking actions).
Both FadeOut and FadeIn accept speed as an argument.
2) Make a GUI with black (or other) background, and change its transparency in a loop, calling "Wait(1)" to let engine update the screen.
Title: Change speed of SetNextScreenTransition?
Post by: Hobbes on Thu 29/07/2021 02:44:06
Hi Crimson Wizard, thanks for your response!

I had figured out how to do this with the FadeOut one. I think in particular I was looking for a way to slow down the other screen transitions (dissolve one in particular). Is that possible in the engine too?