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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help Needed! AddTimer Sequence problem
bjaffedj Offline
Junior Member

Posts: 39
Threads: 8
Joined: Aug 2012
Reputation: 0
#10
RE: Help Needed! AddTimer Sequence problem

(08-12-2012, 07:27 PM)Theforgot3n1 Wrote: Does the other switch(intro) work without problems?


By the way, your way of delaying the next case is really not as good as it can be. Look at rainy halls for example!


yes my other "switch" script works. after the intro switch there is a gameplay sequence and then i wanted to get a new sequence going, but it do'nt want to work this time :/

(08-12-2012, 07:27 PM)Theforgot3n1 Wrote: By the way, your way of delaying the next case is really not as good as it can be. Look at rainy halls for example!

void TimerBlackOut(string &in asTimer)
{
    AddLocalVarInt("BlackoutStep", 1);    //What step to play in the event
    float fEventSpeed = 0.5f;                //The default time between steps in an event

    switch(GetLocalVarInt("BlackoutStep")) {
        case 1:
            StartPlayerLookAt("Arealook2", 0.1f, 0.1f, "");
            FadeIn(4);
            FadeImageTrailTo(2,1);
            AddTimer("rose", 0.5f, "TimerRose");
            SetPlayerActive(true);
            ShowPlayerCrossHairIcons(true);
            SetPlayerMoveSpeedMul(0.05f);
            SetPlayerLookSpeedMul(0.05f);
            fEventSpeed = 3.0f;    //This change here allows the choosing of time until the next case.
        break;
        case 2:
            FadePlayerRollTo(85, 1, 1);
        break;
        case 3:
            StartPlayerLookAt("Arealook3", 0.1f, 0.1f, "");
        break;
        case 4:
            FadeImageTrailTo(0,1);
            FadePlayerRollTo(65, 1, 1);
            AddTimer("thunder", 1, "TimerThunder");
        break;
        case 5:
            PlaySoundAtEntity("sigh", "react_sigh.snt", "Player", 1.0 / 2, false);
            FadeOut(2);
            fEventSpeed = 1.5f;    
        break;
        case 6:
            FadePlayerRollTo(85, 1, 4);
            StartPlayerLookAt("Arealook1", 0.1f, 0.1f, "");
        break;
        case 7:
            FadeImageTrailTo(1.8f,1.5f);
            FadePlayerFOVMulTo(1.25f, 0.01);
        break;
        case 8:
            FadePlayerRollTo(45, 1, 2);
            FadeIn(2);
            fEventSpeed = 1.5f;    
        break;
        case 9:
            StartPlayerLookAt("Arealook2", 0.1f, 0.1f, "");
        break;
        case 10:
            FadePlayerRollTo(15, 1, 2);
            FadePlayerFOVMulTo(0.75f, 0.01);
        break;
        case 11:
            PlaySoundAtEntity("sigh", "react_sigh.snt", "Player", 1.0 / 1.5f, false);
            FadeOut(1);
            StartPlayerLookAt("Arealook3", 1, 1, "");
            FadePlayerRollTo(50, 1, 2);
            fEventSpeed = 2.0f;    
        break;
        case 12:
            SetPlayerMoveSpeedMul(0.1f);
            SetPlayerLookSpeedMul(0.1f);
            StartPlayerLookAt("Arealook1", 1, 1, "");
            FadePlayerFOVMulTo(1.1f, 0.01);
            FadeImageTrailTo(0,1.5f);
            fEventSpeed = 1.5f;    
        break;
        case 13:
            SetPlayerMoveSpeedMul(0.2f);
            SetPlayerLookSpeedMul(0.2f);
            FadePlayerRollTo(-15, 1, 2);
            FadeIn(1);
            StartPlayerLookAt("Arealook4", 2, 2, "");
            fEventSpeed = 2.0f;    
        break;
        case 14:
            SetPlayerMoveSpeedMul(0.3f);
            SetPlayerLookSpeedMul(0.4f);
            FadePlayerRollTo(-30, 10, 60);     
            MovePlayerHeadPos(0, 0, 0, 1, 0.5f);    
            StartPlayerLookAt("Arealook3", 1, 1, "");
            FadePlayerFOVMulTo(0.9f, 0.01);
            FadeImageTrailTo(1.5,2);
            PlaySoundAtEntity("movement", "player_climb.snt", "Player", 0, false);
        break;
        case 15:
            SetPlayerMoveSpeedMul(0.4f);
            SetPlayerLookSpeedMul(0.6f);
            FadePlayerRollTo(10, 10, 20);     
            MovePlayerHeadPos(0, -0.5f, 0, 1, 0.5f);
        break;
        case 16:
            SetPlayerMoveSpeedMul(0.5f);
            SetPlayerLookSpeedMul(0.8f);
            FadePlayerRollTo(0, 10, 60);     
            MovePlayerHeadPos(0, 0, 0, 1, 0.5f);
            StartPlayerLookAt("Arealook4", 2, 2, "");
            FadePlayerFOVMulTo(1, 0.01f);
            PlaySoundAtEntity("movement", "player_climb.snt", "Player", 0, false);
            fEventSpeed = 2.0f;    
        break;
        case 17:
            SetPlayerJumpDisabled(false);
            SetPlayerCrouchDisabled(false);
            SetPlayerMoveSpeedMul(0.6f);
            SetPlayerLookSpeedMul(1.0f);
            FadeImageTrailTo(0,0.2f);
            StopPlayerLookAt();
            PlaySoundAtEntity("sigh", "react_sigh.snt", "Player", 1.0 / 1, false);
            AddTimer("lookloop", RandFloat(2.0f,6.0f), "TimerRandomLook");    //Activate the spinning head
            fEventSpeed = 1.0f;        
        break;
        case 18:
            SetEntityActive("AreaQuest", true);
            //AddQuest("00Trail","00Trail"); In LookAtQuest instead
        break;
    }
    
    if(GetLocalVarInt("BlackoutStep") < 19)  AddTimer("blackout", fEventSpeed, "TimerBlackOut");
}

I actually wan't to thank you a lot! your advise really helped me and i got it to work!
(This post was last modified: 08-12-2012, 08:21 PM by bjaffedj.)
08-12-2012, 07:33 PM
Find


Messages In This Thread
RE: Help Needed! AddTimer Sequence problem - by bjaffedj - 08-12-2012, 07:33 PM



Users browsing this thread: 1 Guest(s)