Frictional Games Forum (read-only)
[SCRIPT] Timer Trouble - 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] Timer Trouble (/thread-23852.html)



Timer Trouble - Pshyched - 11-13-2013

Long time, no see all. I have had a recent bolt of creativity and I have returned to work on my mod again. Although, I have struck a problem. This does not work 100%. It fades out, teleports, waits, and I can actually walk when after it fades in, and then goes black. Unfortunately, it stays black.

Code:
    void EventStart(string &in asTimer)
    {
        string x = asTimer;
        if (x == "T1")
        {
            FadeOut(0.5f);
        }
        if (x == "T2")
        {
            TeleportPlayer("PlayerStartArea_2");
            FadeIn(0.5f);
            SetPlayerActive(false);
        }
        if (x == "T3")
        {
            FadeOut(0.5f);
        }
        if (x == "T4")
        {
            TeleportPlayer("ActivateEvent");
            FadeIn(0.5f);
            SetPlayerActive(true);
        }
    }

Just wondering if anyone would know why this isn't working properly.

I figured it out, T3 was meant to be 4.6 not 0.6.