Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Intro with Text
Author Message
CONFiCKER Offline
Junior Member

Posts: 2
Joined: Dec 2011
Reputation: 0
Post: #1
Intro with Text
So here's the deal:

I have an intro where the screen fades black instantly in the start of the game. Then some text appears on the screen. Let's say the text would stay on the screen for like 5 seconds. The screen would fade in back to normal after the text has gone. But I don't know how to make the screen fade in after the text (5 seconds). It always starts to fade in instantly...

I'm a decent scripter and I would greatly appreciate your help. =(
12-27-2011 08:54 AM
Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,320
Joined: Apr 2011
Reputation: 57
Post: #2
RE: Intro with Text
(12-27-2011 08:54 AM)CONFiCKER Wrote:  So here's the deal:

I have an intro where the screen fades black instantly in the start of the game. Then some text appears on the screen. Let's say the text would stay on the screen for like 5 seconds. The screen would fade in back to normal after the text has gone. But I don't know how to make the screen fade in after the text (5 seconds). It always starts to fade in instantly...

I'm a decent scripter and I would greatly appreciate your help. =(
{
FadeOut(0.1f);
SetMessage(string& asTextCategory, string& asTextEntry, 5.0f);
AddTimer("timer1", 5.0f, "Timer_1");
}


void Timer_1(string &in asTimer)
{
FadeIn(0.1f);
}


With the setmessage:


asTextCategory- the category in the .lang file
asTextEntry - the entry in the .lang file

(This post was last modified: 12-27-2011 09:48 AM by flamez3.)
12-27-2011 09:46 AM
Find all posts by this user Quote this message in a reply
CONFiCKER Offline
Junior Member

Posts: 2
Joined: Dec 2011
Reputation: 0
Post: #3
RE: Intro with Text
(12-27-2011 09:46 AM)flamez3 Wrote:  {
FadeOut(0.1f);
SetMessage(string& asTextCategory, string& asTextEntry, 5.0f);
AddTimer("timer1", 5.0f, "Timer_1");
}


void Timer_1(string &in asTimer)
{
FadeIn(0.1f);
}


With the setmessage:


asTextCategory- the category in the .lang file
asTextEntry - the entry in the .lang file
Okey, thx! Ill try it out! Big Grin

IT WORKD! THANK YOO! ^^
(This post was last modified: 12-27-2011 09:02 PM by CONFiCKER.)
12-27-2011 08:24 PM
Find all posts by this user Quote this message in a reply
Statyk Offline
Modmau5

Posts: 3,600
Joined: Sep 2011
Reputation: 198
Post: #4
RE: Intro with Text
(12-27-2011 09:46 AM)flamez3 Wrote:  void Timer_1(string &in asTimer)
{
FadeIn(0.1f);
}


With the setmessage:


asTextCategory- the category in the .lang file
asTextEntry - the entry in the .lang file
He said he wants to fade it in slowly... And for a better text effect (the text is going to immediately switch with no fade), try a tweaked version here:
//______________________________________


void OnStart()
{
FadeOut(0); //Instant black screen
AddTimer("", 4, "intro1"); //gives a coll-down time for the menu music to stop, THEN starts text intro
}

void intro1(string &in asTimer)
{
SetMessage("CATEGORYNAME", "ENTRYNAME", 5); //text for the intro. change caps with your info
AddTimer("", 6, "intro2"); //6 seconds, an extra 1 to allow the first text to fade completely
}

void intro2(string &in asTimer) //these can be repeated to your needs to how many texts you have.
{
SetMessage("CATEGORYNAME", "ENTRYNAME", 5); //text for the intro. change caps with your info
AddTimer("", 6, "intro3"); //6 seconds, an extra 1 to allow the first text to fade completely
}

//Now to fade the screen back in, starting with the last AddTimer

void intro3(string &in asTimer)
{
FadeIn(2); //two second fadein, the larger, the longer it takes to fade in
}

(This post was last modified: 12-27-2011 09:03 PM by Statyk.)
12-27-2011 09:01 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)