Script Codes for Fading To Black? - 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: Script Codes for Fading To Black? (/thread-21386.html) |
Script Codes for Fading To Black? - FurtherGames - 05-04-2013 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? RE: Script Codes for Fading To Black? - The chaser - 05-04-2013 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"); } RE: Script Codes for Fading To Black? - FurtherGames - 05-04-2013 (05-04-2013, 11:37 AM)The chaser Wrote: void OnStart() 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() 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. RE: Script Codes for Fading To Black? - TheGreatCthulhu - 05-04-2013 Just add FadeIn(1); after TeleportPlayer("PlayerStartArea_2"); Should work. PHP Code: void Doelse (string &in asTimer) RE: Script Codes for Fading To Black? - FurtherGames - 05-04-2013 (05-04-2013, 12:05 PM)TheGreatCthulhu Wrote: Just add FadeIn(1); after TeleportPlayer("PlayerStartArea_2"); Thank you it worked! |