Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Simple script fail
EpicLisbe Offline
Junior Member

Posts: 13
Threads: 4
Joined: Dec 2011
Reputation: 0
#1
Simple script fail

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

}
01-17-2012, 01:46 PM
Find
Linus Ågren Offline
Senior Member

Posts: 309
Threads: 58
Joined: Jan 2011
Reputation: 5
#2
RE: Simple script fail

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.

Creator of The Dark Treasure.
(This post was last modified: 01-17-2012, 01:58 PM by Linus Ågren.)
01-17-2012, 01:57 PM
Website Find
EpicLisbe Offline
Junior Member

Posts: 13
Threads: 4
Joined: Dec 2011
Reputation: 0
#3
RE: Simple script fail

(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???
(This post was last modified: 01-17-2012, 02:23 PM by EpicLisbe.)
01-17-2012, 01:59 PM
Find




Users browsing this thread: 2 Guest(s)