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


Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with sounds!
Cgturner Offline
Junior Member

Posts: 28
Threads: 7
Joined: Sep 2010
Reputation: 0
#4
RE: Help with sounds!

Alright, I entered the functions as you displayed them, but I get an error upon launching Amnesia. Here's my script file:

void OnStart()

{
AddUseItemCallback("useexit", "PrisonKey", "PrisonDoor",
"UseKey", true);
}

void UseKey(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);

RemoveItem(asItem);
}

{
AddEntityCollideCallback("Player", "MyArea", "CollideMyArea", true, 1);

SetEntityPlayerInteractCallback("lantern_1", "LanternTaken", true);
}

void CollideMyArea(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("ScriptArea_1", "11_animal_squeal", "Player", 0, false);
}

void LanternTaken(string &in asEntity)
{
PlaySoundAtEntity("ScriptArea_1", "05_wall_scratch", "Player", 0, false);
}

I get a ""FATAL ERROR" and it shows that at (15,1) there is an "unexpected token'{'". The key script works fine as is, I've tested it, but am I doing something obviously wrong with the scripts you gave?
Sorry, I didn't post the code in a box. :/ I'd like to know how to do that as well.
(This post was last modified: 09-16-2010, 08:18 PM by Cgturner.)
09-16-2010, 08:18 PM
Find


Messages In This Thread
Help with sounds! - by Cgturner - 09-16-2010, 07:42 PM
RE: Help with sounds! - by MulleDK19 - 09-16-2010, 07:54 PM
RE: Help with sounds! - by Armored Cow - 09-16-2010, 08:01 PM
RE: Help with sounds! - by Cgturner - 09-16-2010, 08:18 PM
RE: Help with sounds! - by MulleDK19 - 09-16-2010, 08:19 PM
RE: Help with sounds! - by Cgturner - 09-17-2010, 01:00 AM
RE: Help with sounds! - by MulleDK19 - 09-17-2010, 01:07 AM
RE: Help with sounds! - by Cgturner - 09-17-2010, 01:18 AM
RE: Help with sounds! - by MulleDK19 - 09-17-2010, 01:31 AM
RE: Help with sounds! - by Cgturner - 09-17-2010, 01:45 AM
RE: Help with sounds! - by Armored Cow - 09-17-2010, 02:11 AM
RE: Help with sounds! - by Cgturner - 09-17-2010, 03:21 AM
RE: Help with sounds! - by MulleDK19 - 09-17-2010, 03:25 AM
RE: Help with sounds! - by Cgturner - 09-17-2010, 03:51 AM
RE: Help with sounds! - by MulleDK19 - 09-17-2010, 04:06 PM
RE: Help with sounds! - by Cgturner - 09-17-2010, 03:56 PM
RE: Help with sounds! - by jens - 09-17-2010, 04:17 PM
RE: Help with sounds! - by Armored Cow - 09-17-2010, 04:04 PM
RE: Help with sounds! - by Cgturner - 09-17-2010, 04:25 PM
RE: Help with sounds! - by Cgturner - 09-18-2010, 06:58 AM
RE: Help with sounds! - by gosseyn - 09-18-2010, 07:19 AM
RE: Help with sounds! - by Cgturner - 09-18-2010, 07:51 AM



Users browsing this thread: 2 Guest(s)