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
Script Codes for Fading To Black?
FurtherGames Offline
Member

Posts: 72
Threads: 23
Joined: Apr 2013
Reputation: 1
#1
Wink  Script Codes for Fading To Black?

Hello, recently I've been working on a new conversion mod. I'm looking for script codes so that when the player collides with a script area the player will go inactive, the screen will fade to black and there is a timer so once the timer ends he teleports. If not all of this is possible to do in one function, what will I need to do?
(This post was last modified: 05-04-2013, 01:31 PM by FurtherGames.)
05-04-2013, 11:26 AM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
RE: Script Codes for Fading To Black?

void OnStart()
{
AddEntityCollideCallback("Player", "Area", "Dothing", true, 1);
}

void Dothing (string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
FadeOut(1);
AddTimer("", 5, "Doelse");
}

void Doelse (string &in asTimer)
{
TeleportPlayer("PlayerStartArea_2");
}

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
05-04-2013, 11:37 AM
Find
FurtherGames Offline
Member

Posts: 72
Threads: 23
Joined: Apr 2013
Reputation: 1
#3
RE: Script Codes for Fading To Black?

(05-04-2013, 11:37 AM)The chaser Wrote: void OnStart()
{
AddEntityCollideCallback("Player", "Area", "Dothing", true, 1);
}

void Dothing (string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
FadeOut(1);
AddTimer("", 5, "Doelse");
}

void Doelse (string &in asTimer)
{
TeleportPlayer("PlayerStartArea_2");
}


Thanks! Is there a way so that once the screen goes black, it lights back up? I want to test it before I include the teleporting script.

(05-04-2013, 11:37 AM)The chaser Wrote: void OnStart()
{
AddEntityCollideCallback("Player", "Area", "Dothing", true, 1);
}

void Dothing (string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
FadeOut(1);
AddTimer("", 5, "Doelse");
}

void Doelse (string &in asTimer)
{
TeleportPlayer("PlayerStartArea_2");
}


Thanks! Is there a way so that once the screen goes black, it lights back up? I want to test it before I include the teleporting script.
(This post was last modified: 05-04-2013, 11:54 AM by FurtherGames.)
05-04-2013, 11:51 AM
Find
TheGreatCthulhu Offline
Member

Posts: 213
Threads: 10
Joined: Oct 2010
Reputation: 32
#4
RE: Script Codes for Fading To Black?

Just add FadeIn(1); after TeleportPlayer("PlayerStartArea_2");
Should work.
PHP Code: (Select All)
void Doelse (string &in asTimer)
{
    
TeleportPlayer("PlayerStartArea_2");
    
FadeIn(1);

(This post was last modified: 05-04-2013, 12:05 PM by TheGreatCthulhu.)
05-04-2013, 12:05 PM
Find
FurtherGames Offline
Member

Posts: 72
Threads: 23
Joined: Apr 2013
Reputation: 1
#5
Smile  RE: Script Codes for Fading To Black?

(05-04-2013, 12:05 PM)TheGreatCthulhu Wrote: Just add FadeIn(1); after TeleportPlayer("PlayerStartArea_2");
Should work.
PHP Code: (Select All)
void Doelse (string &in asTimer)
{
    
TeleportPlayer("PlayerStartArea_2");
    
FadeIn(1);


Thank you it worked!
05-04-2013, 12:15 PM
Find




Users browsing this thread: 1 Guest(s)