Frictional Games Forum (read-only)

Full Version: Script aint working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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
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.