Hello Guys I need a little help.
My second map is way better than my first. Now I have a Problem with an Error. I try many things but this doesn't help. Each time I arrive in one of the maps the game crashes.
Error
http://i46.servimg.com/u/f46/17/76/85/90/2012_111.jpg
What am I doing wrong?
Thats the Script of the Level that doesn't Work:
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "Scary1", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "TOTSCHRECK", true, 1);
SetEntityCallbackFunc("key_laboratory_3", "OnPickup");
SetEntityCallbackFunc("key_laboratory_1", "OnPickup");
SetEntityCallbackFunc("key_laboratory_2", "OnPickup");
}
void Scary1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "laugh.snt", "Player", 0, false);
SetEntityActive("corpse_male_1", true);
AddPropImpulse("Scary1", -20, 0, -20, "world");
}
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 OnPickup(string &in asEntity, string &in type)
{
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
PlaySoundAtEntity("", "spruche.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("ScriptArea_2", true);
}
void OnPickup(string &in asEntity, string &in type)
{
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
PlaySoundAtEntity("", "bam.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("agrippa_head_1", true);
}
void OnPickup(string &in asEntity, string &in type)
{
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("stuffed_dog_head_1", true);
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
Thanks for helping