Frictional Games Forum (read-only)
Script aint working - 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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Script aint working (/thread-8516.html)



Script aint working - xtron - 06-09-2011

I tried everything but I can't get my script to work! ;(

Code:
void OnStart()
{
AddEntityCollideCallback("Player" , "scare1" , "insanity_increase1" , true , 1);
}

void insanity_increase1(string &in asEntity, int alState)
{
    PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
    GiveSanityDamage(5.0f, true);
    PlayMusic("05_event_steps.ogg", false, 80, 0, 10, false);
}

thanks in advance.


RE: Script aint working - DarkEagle - 06-09-2011

Code:
void OnStart()
{
AddEntityCollideCallback("Player" , "scare1" , "insanity_increase1" , true , 1);
}

void insanity_increase1(string &in asParent, string &in asChild, int alState)
{
    PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
    GiveSanityDamage(5.0f, true);
    PlayMusic("05_event_steps.ogg", false, 80, 0, 10, false);
}

Maybe, now? Smile


RE: Script aint working - WatzUpzPeepz - 06-09-2011

Code:
void OnStart()
{
AddEntityCollideCallback("Player", "scare1", "insanity_increase1", true ,1);
}

void insanity_increase1(string &in asEntity, int alState)
{
    PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
    GiveSanityDamage(5.0f, true);
    PlayMusic("05_event_steps.ogg", false, 80, 0, 10, false);
}

I dont think you are to put the spaces between the quotation marks and the commas.