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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The trick with the sound
jens Offline
Frictional Games

Posts: 4,093
Threads: 199
Joined: Apr 2006
Reputation: 202
#4
RE: The trick with the sound

I think best is to look through http://hpl2.frictionalgames.com/tutorial...tutorial_1

Short version: You need to select the door in the level editor and in the Entity tab, under PlayerInteractCallback type InteractingWithDoor

Then you have to have a proper default script file to begin with (there is one in the tutorial).

Open your you default script file and anywhere that is NOT in OnStart, OnEnter or OnLeave write the function for that callback you just type into the editor. Like this:

void InteractingWithDoor(string &in asEntity)
{
    PlaySoundAtEntity("ScriptArea_1", "21_screams.snt", "Player", 1, false);

    AddDebugMessage("Playing Sound!", false);
}

Also make sure that you really have that ScriptArea_1 in the level. If you do not see the debug message or hear the sound, the function was not triggered at all.
(This post was last modified: 09-17-2010, 02:01 PM by jens.)
09-17-2010, 01:59 PM
Website Find


Messages In This Thread
The trick with the sound - by Dismortal - 09-17-2010, 04:41 AM
RE: The trick with the sound - by jens - 09-17-2010, 07:13 AM
RE: The trick with the sound - by Dismortal - 09-17-2010, 01:44 PM
RE: The trick with the sound - by jens - 09-17-2010, 01:59 PM
RE: The trick with the sound - by Dismortal - 09-17-2010, 02:40 PM
RE: The trick with the sound - by Cgturner - 09-17-2010, 03:31 PM
RE: The trick with the sound - by jens - 09-17-2010, 04:24 PM
RE: The trick with the sound - by Cgturner - 09-17-2010, 04:28 PM
RE: The trick with the sound - by Requiem - 09-19-2010, 05:14 PM
RE: The trick with the sound - by Pandemoneus - 09-19-2010, 06:00 PM
RE: The trick with the sound - by Armored Cow - 09-19-2010, 10:08 PM
RE: The trick with the sound - by Pandemoneus - 09-19-2010, 11:08 PM



Users browsing this thread: 1 Guest(s)