Frictional Games Forum (read-only)
[SCRIPT] Simple script fail - 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: [SCRIPT] Simple script fail (/thread-12668.html)



Simple script fail - EpicLisbe - 01-17-2012

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);

}



RE: Simple script fail - Linus Ă…gren - 01-17-2012

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.


RE: Simple script fail - EpicLisbe - 01-17-2012

(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???