Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 6 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script causing game to randomly crash (No FATAL ERROR)
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#76
RE: extra_english now is working, but I need help with a different script :)

RemoveTimer("BlackOut");
that is outside any function

Also yout case/break thingie wont work... there is nothing triggering the timer after the first one
I created this simple switch timer thingie for everyone to use. If someone has questions about how it really works, ask me!
//SIMPLE SWITCH TIMER THINGIE//
//FIRST SOMETHING TO START IT (timer in some function you want it to start from)
        AddTimer("", 0.0f, "ThisIsTheTimer");
void ThisIsTheTimer(string &in asTimer)
{    AddLocalVarInt("Stage", 1);
    float fEventSpeed = 1.0f;
    switch(GetLocalVarInt("Stage"))
        {case 1:
            //Whatever you wantto happen goes in between case and break
            break;
        case 2:
            //TYPICAL WAKE UP/BLACK OUT FUNCTONS:
            //MovePlayerHeadPos(float afX, float afY, float afZ, float afSpeed, float afSlowDownDist); If I remember right, float afY at 1.0f is the normal head position
            //FadePlayerRollTo(float afX, float afSpeedMul, float afMaxSpeed);     float afX is normal when its 0.0f
            //SetPlayerCrouchDisabled(bool abX);
            //SetPlayerJumpDisabled(bool abX);  These are so that the player cant jump or crouch underground while passing out...
            //SetPlayerRunSpeedMul(float afMul);
            //SetPlayerMoveSpeedMul(float afMul); These so that the player cant run when down on the ground...
            //FadeOut(float afTime); //self explanatory...
            break;
        }
    if(GetLocalVarInt("Stage") < 6)   AddTimer("ThisRepeatsTheTimer", fEventSpeed, "ThisIsTheTimer");
}
(This post was last modified: 05-26-2011, 06:36 PM by Khyrpa.)
05-26-2011, 06:16 PM
Find Reply


Messages In This Thread
RE: Where can I find water? - by Greven - 05-08-2011, 05:19 PM
RE: Where can I find water? - by RawkBandMan - 05-08-2011, 05:44 PM
RE: Where can I find water? - by Simpanra - 05-08-2011, 08:33 PM
RE: Where can I find water? - by Greven - 05-08-2011, 09:22 PM
RE: Where can I find water? - by Simpanra - 05-08-2011, 09:28 PM
RE: Where can I find water? - by Greven - 05-08-2011, 09:32 PM
RE: Where can I find water? - by Simpanra - 05-08-2011, 09:33 PM
RE: Where can I find water? - by Greven - 05-08-2011, 09:38 PM
RE: Where can I find water? - by Simpanra - 05-08-2011, 09:46 PM
RE: Where can I find water? - by RawkBandMan - 05-08-2011, 09:50 PM
RE: Where can I find water? - by Roenlond - 05-08-2011, 08:31 PM
RE: Where can I find water? - by RawkBandMan - 05-08-2011, 09:18 PM
RE: Where can I find water? - by Simpanra - 05-08-2011, 09:59 PM
RE: Where can I find water? - by RawkBandMan - 05-08-2011, 10:27 PM
RE: Where can I find water? - by Karai16 - 05-08-2011, 11:22 PM
RE: Where can I find water? - by RawkBandMan - 05-09-2011, 12:01 AM
RE: extra_english now is working, but I need help with a different script :) - by Khyrpa - 05-26-2011, 06:16 PM



Users browsing this thread: 1 Guest(s)