Frictional Games Forum (read-only)
How do I make instant fade - in ? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: How do I make instant fade - in ? (/thread-23898.html)



How do I make instant fade - in ? - Slanderous - 11-19-2013

Hey guys, so basically this is my script:

void OnStart()
{
PlayMusic("02_amb_safe.ogg", true, 0.8, 2, 1, true);
SetEntityCallbackFunc("horror01","CapturePlaya");
}

void CapturePlaya(string &in AsItem, string &in asEntity)
{
FadeIn(10);
SetPlayerRunSpeedMul(0.0f);
PlaySoundAtEntity("", "capture01.snt", "Player", 0, false);
SetPlayerActive(false);
AddTimer("trig1", 8.0f, "beginStory");
}
void beginStory(string &in asTimer)
{
ChangeMap("CastlePrison04","PlayerStartArea_1","","");
}

Everything works fine except FadeIn. Even if I put 1, not 10 it is taking long time to fade the screen to black. This is annoying, I wanted to make script that is making a fade in, sets player deactivated and plays the sound of capturing player that i created and then after 8 seconds it changes the map. xD And I don't get why the FadeIn takes so long to turn the screen black, that is the only one problem I have.

Geez I thought scripting was easier, started making scripts from week ago and I still don't get many things :O

Anyways thanks for advance and of course rep+ for any help!


RE: How do I make instant fade - in ? - ExpectedIdentifier - 11-19-2013

Not exactly sure what you mean but I'm pretty sure you want FadeOut(0);
This will fade out the screen instantly (meaning it'll be black). You can then fade in the screen with FadeIn();


RE: How do I make instant fade - in ? - Slanderous - 11-19-2013

(11-19-2013, 06:03 PM)sonataarctica Wrote: Not exactly sure what you mean but I'm pretty sure you want FadeOut(0);
This will fade out the screen instantly (meaning it'll be black). You can then fade in the screen with FadeIn();

Oh, that was what I meant, man. Thanks! Rep+


RE: How do I make instant fade - in ? - DnALANGE - 11-19-2013

(11-19-2013, 06:21 PM)Doge Wrote:
(11-19-2013, 06:03 PM)sonataarctica Wrote: Not exactly sure what you mean but I'm pretty sure you want FadeOut(0);
This will fade out the screen instantly (meaning it'll be black). You can then fade in the screen with FadeIn();

Oh, that was what I meant, man. Thanks! Rep+
EASYE REP Tongue