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)
RawkBandMan Offline
Posting Freak

Posts: 1,146
Threads: 35
Joined: Nov 2010
Reputation: 5
#77
RE: extra_english now is working, but I need help with a different script :)

(05-26-2011, 06:16 PM)Khyrpa Wrote: 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");
}

I'd have to ask yo how it actually works, and what I could put in each thing....

I copied it from the 25_nave_tunnels.map from Main or whatever the map is called and I thought it would basically work without much editing.

I've come to learn to not fear the living, nor the dead... But the monsters that hide in closets.
05-27-2011, 07:25 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 RawkBandMan - 05-27-2011, 07:25 PM



Users browsing this thread: 1 Guest(s)