FurtherGames
Member
Posts: 72
Threads: 23
Joined: Apr 2013
Reputation:
1
|
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 |
|
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
|
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)
Aculy iz dolan.
|
|
05-04-2013, 11:37 AM |
|
FurtherGames
Member
Posts: 72
Threads: 23
Joined: Apr 2013
Reputation:
1
|
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 |
|
TheGreatCthulhu
Member
Posts: 213
Threads: 10
Joined: Oct 2010
Reputation:
32
|
RE: Script Codes for Fading To Black?
Just add FadeIn(1); after TeleportPlayer("PlayerStartArea_2");
Should work.
void Doelse (string &in asTimer) { TeleportPlayer("PlayerStartArea_2"); FadeIn(1); }
|
|
05-04-2013, 12:05 PM |
|
FurtherGames
Member
Posts: 72
Threads: 23
Joined: Apr 2013
Reputation:
1
|
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.
void Doelse (string &in asTimer) { TeleportPlayer("PlayerStartArea_2"); FadeIn(1); }
Thank you it worked!
|
|
05-04-2013, 12:15 PM |
|
|