Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I make instant fade - in ?
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#1
How do I make instant fade - in ?

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!
11-19-2013, 05:56 PM
Find
ExpectedIdentifier Offline
Member

Posts: 234
Threads: 10
Joined: Sep 2012
Reputation: 11
#2
RE: How do I make instant fade - in ?

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();

Closure ModDB page:

[Image: 16LO8Sx]
11-19-2013, 06:03 PM
Find
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#3
RE: How do I make instant fade - in ?

(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+
11-19-2013, 06:21 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#4
RE: How do I make instant fade - in ?

(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
(This post was last modified: 11-19-2013, 07:19 PM by DnALANGE.)
11-19-2013, 07:18 PM
Find




Users browsing this thread: 1 Guest(s)