Frictional Games Forum (read-only)

Full Version: Simple script fail
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Well i had about 3 weeks break about scripting and i forgot scripting almost completely so what is wrong in this script and it says unexcepted end of the file...



void OnStart()

{
AddEntityCollideCallback("Player", "noita", "KoiranTulo", true, 1);

}

void Koirantulo (string &in asEntity, string &in type)

{
SetEntityActivate ("koira_1", true);
PlaySoundAtEntity("", "00_laugh.snt", "door_scare);

}
First of all, EntityCollideCallbacks arguments are "string &in asParent, string &in asChild, int alState".


Secondly, PlaySoundAtEntity is written wrong.


Write it like this:
PlaySoundAtEntity("", "00_laugh.snt", "door_scare", 0.0f, false);

You also forgot the " after "door_scare.
(01-17-2012, 01:57 PM)junkfood2121 Wrote: [ -> ]First of all, EntityCollideCallbacks arguments are "string &in asParent, string &in asChild, int alState".


Secondly, PlaySoundAtEntity is written wrong.


Write it like this:
PlaySoundAtEntity("", "00_laugh.snt", "door_scare", 0.0f, false);

You also forgot the " after "door_scare.
Ty Rolleyes



Omg.... Now i got problem it said at SetEntityActivate signature not match or something like that but i checked my enemy Dog i call it "koira_1" and its also "koira_1" in script so anyidea what the hell is wrong???