Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Strange error
Fishnugget Offline
Member

Posts: 72
Threads: 6
Joined: Aug 2012
Reputation: 1
#1
Strange error

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
12-06-2012, 02:58 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
RE: Strange error

The error box says it... don't you see that you have "OnPickup" 3 times?

Go to the level editor. There should be a "CallbackFunc". There, put OnPickup_1 for key_laboratory_1, and OnPickup_2 for the key_2, etc. Ok, now, rename the functions according to the desired effect. I don't know what order do you want to achieve, so do what I said and, hopefully, it should fix it.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
12-06-2012, 03:13 PM
Find
Fishnugget Offline
Member

Posts: 72
Threads: 6
Joined: Aug 2012
Reputation: 1
#3
RE: Strange error

thanks, sometimes im just an idiot x'D
Thanks
12-06-2012, 03:38 PM
Find




Users browsing this thread: 1 Guest(s)