12-06-2012, 05:00 PM
So, im sure I will have many problems with my custom Story during the editing. So I open a Thread for this problems^^'
So my Problem in this moment is weird....
I want to make a Jump Scare. A grunt Body have to teleporting front of the player. This works perfectly. But it doesnt dissapear. I write in another Area the same but I change from True to False. It doesn't Work...
Why?
This is the using Script:
AddEntityCollideCallback("Player", "ScriptArea_2", "TOTSCHRECK", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "AndereArea2", true, 1);
}
void TOTSCHRECK(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "bam.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("grunt_body_part2_2", true);
}
void AndereArea2(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("grunt_body_part2_2", false);
}
Whats wrong?
So my Problem in this moment is weird....
I want to make a Jump Scare. A grunt Body have to teleporting front of the player. This works perfectly. But it doesnt dissapear. I write in another Area the same but I change from True to False. It doesn't Work...
Why?
This is the using Script:
AddEntityCollideCallback("Player", "ScriptArea_2", "TOTSCHRECK", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "AndereArea2", true, 1);
}
void TOTSCHRECK(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "bam.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("grunt_body_part2_2", true);
}
void AndereArea2(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("grunt_body_part2_2", false);
}
Whats wrong?