Hi folks,
Some scripts I made for you to play around with.
If you got any requests just shoot
.
Thunder script:
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:
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");
}