The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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 Some complex issue (SOLVED)
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#1
Some complex issue (SOLVED)

So, this script worked perfectly before; I added something in and it doesn't work anymore. Since of my bad memory I can't remember what it was I added in. So, I'm taking some help from you guys.

void TimerGuardian(string &in asTimer)
{
    float fShadowLumpFadeMul = RandFloat(2.0, 3.0);
    float fShadowNewStep = 3.0f;
    float fDelayToEvent = 0.25f;
    
    //Set up a random scream (33% chance)
    if(alLumpIdx > 5 && RandInt(0,2)==0)
    {
        PlaySoundAtEntity("GuardianScream", "25_guardian_ontop.snt", "Player", 0, false);
    }
    
    //Reached final step, no need for further guardian sounds
    if(GetLocalVarInt(sEvent) == 12) return;
    
    //Configurables
    string sEvent = asTimer; //Sets the timer name to the variable name
    AddLocalVarInt(sEvent, 1); //Sets a variable to the guardians step
    string sDmgDeathArea = "AreaGuardianKill_" + GetLocalVarInt(sEvent); //Sets a new dmg area after each variable
    
    for(int i=1; i<=6; ++i) SetPropActiveAndFade("slime_"+GetLocalVarInt(sEvent)+"_"+i, true, fShadowLumpFadeMul);
    GuardianGroundEffect("AreaGuardianEffectFloor_"+GetLocalVarInt(sEvent), true);
    SetEntityActive(sDmgDeathArea, true);
    FadeInGuardianLight("ShadowLight_"+GetLocalVarInt(sEvent));
    
    StartScreenShake(0.1f, RandFloat(0.15f,0.6f), 0, 0.1);
    PlaySoundAtEntity("GuardianSplashSound", "25_guardian_slime_appear.snt", "Player", 0, false);
    
    AddTimer(sEvent, fShadowNewStep, "TimerGuardian");
    
    //Set checkpoint
    CheckPoint("reset", "PlayerStartArea_1", "ResetGuardian", "Hints", "DeathByWorm1");
    
    //Extra events depending on the step
    int alLumpIdx = GetLocalVarInt(sEvent);
    AddTimer("EventStep"+alLumpIdx, fDelayToEvent, "EventStep"+alLumpIdx);
}

And the custom scripts (such as GuardianGroundEffect) works perfectly. I can assure you.

Derp.
(This post was last modified: 08-16-2014, 10:58 PM by Neelke.)
08-16-2014, 01:19 AM
Find


Messages In This Thread
Some complex issue (SOLVED) - by Neelke - 08-16-2014, 01:19 AM
RE: Some complex issue - by FlawlessHappiness - 08-16-2014, 02:32 AM
RE: Some complex issue - by Neelke - 08-16-2014, 12:07 PM
RE: Some complex issue - by Mudbill - 08-16-2014, 03:44 PM
RE: Some complex issue - by TheGreatCthulhu - 08-16-2014, 07:25 PM
RE: Some complex issue - by Neelke - 08-16-2014, 10:41 PM
RE: Some complex issue (SOLVED) - by Neelke - 08-17-2014, 02:16 PM



Users browsing this thread: 1 Guest(s)