Frictional Games Forum (read-only)
Can anyone fix this for me, please? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Can anyone fix this for me, please? (/thread-17579.html)



Can anyone fix this for me, please? - Melvin - 08-07-2012

It says I did something wrong at void ArmScare(string &in asEntity, int 1)
I can't figure out what's wrong, can anyone fix this?


////////////////////////////
// Run first time starting map
void OnStart()
{
PreloadSound("whatthehell.snt");
AddEntityCollideCallback("Player", "StairArea", "Sound", true, 1);
SetEntityPlayerLookAtCallback(string& MonsterArm, string& ArmScare, bool false);
}

void ArmScare(string &in asEntity, int 1)
{
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
GiveSanityDamage(8.0f, true);
}


void Sound(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("sound", "whatthehell.snt", "StairArea", 0.0, false);
}


RE: Can anyone fix this for me, please? - Adny - 08-07-2012

Here you go:


////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "StairArea", "Sound", true, 1);
SetEntityPlayerLookAtCallback("MonsterArm", "ArmScare", false);
}

void ArmScare(string &in asEntity, int alState)
{
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
GiveSanityDamage(8.0f, true);
}


void Sound(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("sound", "whatthehell", "StairArea", 0.0, false);
}

void OnEnter()
{
PreloadSound("whatthehell");
}

void OnLeave()
{

}


RE: Can anyone fix this for me, please? - Melvin - 08-07-2012

(08-07-2012, 08:43 PM)andyrockin123 Wrote: Here you go:


////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "StairArea", "Sound", true, 1);
SetEntityPlayerLookAtCallback("MonsterArm", "ArmScare", false);
}

void ArmScare(string &in asEntity, int alState)
{
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
GiveSanityDamage(8.0f, true);
}


void Sound(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("sound", "whatthehell", "StairArea", 0.0, false);
}

void OnEnter()
{
PreloadSound("whatthehell");
}

void OnLeave()
{

}
Well, thank you kind sir! Can you also help me with a timer? I want a loud BANG at the door behind me after the player gets shocked by the object. I never worked with Timers so I've got no clue!