RE: How to script the guardian effect?
The result
main(27,3):ERR :No matching signatures to 'SetPropActiveAndFade(string@&, const bool)'
My Script
////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "Slime", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "Roar", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "S", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "Scare", true, 1);
}
void Slime(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "scare_loon.snt", "Player", 0, false);
AddTimer("", 4, "Wispher");
}
void Wispher(string &in asTimer)
{
PlaySoundAtEntity("", "insanity_imageflash01.snt", "Player", 0, false);
AddTimer("", 7, "Help");
}
void Help(string &in asTimer)
{
PlaySoundAtEntity("", "guardian_distant1.snt", "Player", 0, false);
}
void S(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "guardian_activated.snt", "Player", 0, false);
SetPropActiveAndFade("S_1", true);
SetPropActiveAndFade("S_2", true);
SetPropActiveAndFade("S_3", true);
SetPropActiveAndFade("S_4", true);
SetPropActiveAndFade("S_4", true);
StartScreenShake(0.9f, 1, 0.9f, 1.0f);
}
void Scare(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "guardian_activated.snt", "Player", 0, false);
SetPropActiveAndFade("P_1", true);
SetPropActiveAndFade("P_2", true);
SetPropActiveAndFade("P_3", true);
SetPropActiveAndFade("P_4", true);
SetPropActiveAndFade("P_5", true);
SetPropActiveAndFade("P_6", true);
StartScreenShake(0.9f, 1, 0.9f, 1.0f);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
|