FadeIn problem (Room appears before FadeIn)

Started by , Sat 08/07/2006 16:52:31

Previous topic - Next topic

FoDooG

Hi.

I have filed through manual, board to search a similiar issue, but no success.

My problem is:

I set the room transition to instant, cause only some rooms/backgrounds(titles,logo) need a fade in and out.

I implemented the FadeIn command in the script as following:


Code: ags
#sectionstart room_bÃ,  // DO NOT EDIT OR REMOVE THIS LINE
function room_b() {
Ã,  // script for Room: Player enters room (after fadein)
Mouse.Visible=false;
FadeIn(1);
StartCutscene(eSkipESCOrRightButton);
Wait(120);
FadeOut(1);
EndCutscene();
player.ChangeRoom(11, 200,400);Ã,  
}


Problem here: For a millisec, you already can see the room, before it starts to fade in. The game is set in 800x600 in 16bit High-c.

Is there another place, where I should put the FadeIn? If you need any additional info, I'd be happy to provide.

Cheers,
FoDooG

Khris

You can change the transition style in-game:
QuoteSetScreenTransition(TransitionStyle)

Changes the default screen transition. TransitionStyle can be one of the following:
eTransitionFade
eTransitionInstant
eTransitionDissolve
eTransitionBoxout
eTransitionCrossfade

All future transitions will be done as specified until you call this function again.

It's on the same page as FadeIn/FadeOut, btw ;)

FoDooG

#2
Hmmmm! That sounds good.

Thanks for the fast reply. I will try that.

Ashen

Setting the mouse invisible before leaving the previous room may solve it.
Another thing to try would be putting the FadeIn command in 'Player enters room (before Fadein)'. Even when the transition is set to Instant, I believe that runs first.

But Khris beat me to it, with a better answer...
I know what you're thinking ... Don't think that.

FoDooG

#4
Thanks. I tried to put it "before Fade In", result, that no fadeIn at all happened. Khris' solution worked great, just need to check how to change the speed, but I saw plenty threads about that one.

Cheers!

EDIT: Forgot to say, it also happened in the next screen, where the mouseVisibility was already false.

Quote from: KhrisMUC on Sat 08/07/2006 16:57:28

It's on the same page as FadeIn/FadeOut, btw ;)

Argh... beaten on the first post here... and I really tried to stick to the rules... lol, one down for me. ::)

EDIT by Ashen: No need to quote the whole previous post. And I did say Khris' was the better answer ;)

Last Edit: Oh, and initial question solved, btw :)

SMF spam blocked by CleanTalk