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
Script help. Again.
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#8
RE: Script help. Again.

(03-08-2014, 11:07 AM)Neelke Wrote: Well, before I got the unexpected end thing, my script was like 700 lines long and it worked then. Then I added this cutscene and this happened. Besides, it's still not entirely working, there's something else that is wrong. And I'm fully certain that the issue is somewhere here.

I changed it a little bit

//During ritual cutscene, the lights outside needs to be unlit (if lit)
void SetLightVisibleOutside(bool abLit)
{
    if(abLit == false)
    {
        SetLampLit("candle_floor_4", abLit, false);
        SetLampLit("torch_static01_1", abLit, false);
        
        FadeLightTo("PointLight_10", 0.0f, 0.0f, 0.0f, 0.0f, 4.5f, 0.0f);
        FadeLightTo("SpotLight_3", 0.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f);
        FadeLightTo("PointLight_3", 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f);
    }
    else
    {
        SetLampLit("candle_floor_4", true, false);
        
        FadeLightTo("PointLight_10", 0.28f, 0.13f, 0.0f, 0.0f, 4.5f, 0.0f);
        FadeLightTo("SpotLight_3", 0.3f, 0.2f, 0.0f, 1.0f, 8.0f, 0.0f);
        
        if(GetLocalVarInt("TorchLit")==1)
        {
            SetLampLit("torch_static01_1", true, false);
        }
    }
}

//If this torch was never lit, we don't want to be lit unintentionally
void LitVisibleTorch(string &in asEntity, string &in asType)
{
    SetLocalVarInt("TorchLit", 1);
}

//This is the brute walking towards the ritual prisoner room
void DoBruteStep()
{
    AddLocalVarInt("Step", 1);
    
    PlaySoundAtEntity("bwalk", "metal_walk.snt", "AreaStep_"+GetLocalVarInt("Step")[b]+"[/b], 0.0f, false);
    
    if(GetLocalVarInt("Step")==12)
    {    
        ResumeEventTimer("TimerRitualVision", 0.1f);
        return;
    }
    
    AddTimer("loopstep", RandFloat(1.0f, 2.0f), "TimerLoopBruteStep"); //So it feels more random
}

void TimerLoopBruteStep(string &in asTimer)
{
    DoBruteStep();
}

//Resumes an event timer after a step is over
void ResumeEventTimer(string &in asTimer, float afTime)
{
    AddTimer(asTimer, afTime, asTimer);
}

Pretty sure that it shouldn't be there. Delete it. (Marked it with bold)

"Veni, vidi, vici."
"I came, I saw, I conquered."
03-08-2014, 11:11 AM
Find


Messages In This Thread
Script help. Again. - by Neelke - 03-07-2014, 10:06 PM
RE: Script help. Again. - by Mudbill - 03-07-2014, 10:52 PM
RE: Script help. Again. - by Neelke - 03-07-2014, 11:03 PM
RE: Script help. Again. - by Slanderous - 03-07-2014, 11:08 PM
RE: Script help. Again. - by Mudbill - 03-07-2014, 11:10 PM
RE: Script help. Again. - by Putmalk - 03-08-2014, 12:19 AM
RE: Script help. Again. - by Neelke - 03-08-2014, 11:07 AM
RE: Script help. Again. - by PutraenusAlivius - 03-08-2014, 11:11 AM
RE: Script help. Again. - by Neelke - 03-08-2014, 11:26 AM
RE: Script help. Again. - by PutraenusAlivius - 03-08-2014, 11:29 AM
RE: Script help. Again. - by Traggey - 03-08-2014, 02:43 PM
RE: Script help. Again. (SOLVED) - by Neelke - 03-08-2014, 03:23 PM



Users browsing this thread: 1 Guest(s)