Frictional Games Forum (read-only)
Scripts - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Scripts (/thread-5882.html)



Scripts - ModManDann - 12-25-2010

Hi folks,

Some scripts I made for you to play around with.
If you got any requests just shoot Smile.

Thunder script:
Code:
void StartThunder(float &in afDelay,float &in afTimeBetween)
    {
        SetLocalVarFloat("ThunderTimeBetween",afTimeBetween);
        AddTimer("Thunder",afDelay,"Thunder");
    }
void StopThunder()
    {
        RemoveTimer("Thunder");
    }
void Thunder(string  &in asTimer)
    {
        StartEffectFlash(0.1f,0.1f,0.1f);
        PlaySoundAtEntity("thunder", "general_thunder.snt", "Player", 0.0f,false);
        AddTimer("Thunder",GetLocalVarFloat("ThunderTimeBetween"),"Thunder");
    }

HeartBeat script:
Code:
void StartHeartBeat(float &in afDelay)
    {
        AddTimer("HeartBeats",afDelay,"HeartBeat");
    }
void StopHeartBeat()
    {
        RemoveTimer("HeartBeats");
        PlaySoundAtEntity("breath", "react_breath.snt", "Player", 0.0f,false);
    }
void ModifyBeatRate(float &in afModifier)
    {
        AddLocalVarFloat("BeatRate",afModifier);
    }
void HeartBeat(string  &in asTimer)
    {
        
        if(GetLocalVarFloat("BeatRate") <= 0.5f)
            {
                SetLocalVarFloat("BeatRate",2.0f);
            }
        PlaySoundAtEntity("heartbeat","sanity_heartbeat.snt","Player",0.0,false);
        AddTimer("HeartBeats",GetLocalVarFloat("BeatRate"),"HeartBeat");
    }



RE: Scripts - Tenacious - 12-25-2010

You can find these through Frictional scripts very easily, but thanks for the share!


RE: Scripts - ModManDann - 12-25-2010

Didn't take a look in those yet, I'll go check them out. Thank you to Smile