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
sound script issue
G510s Offline
Banned

Posts: 58
Threads: 32
Joined: Jun 2014
#1
sound script issue

void OnStart()
{
PlayMusic("Search_Brute", true, 5, 3.0, 4, true);

AddEntityCollideCallback("Player", "Script", "UseScript", true, 1);

AddEntityCollideCallback("Player", "Script_1", "Sound", true, 1);
}



void Sound(string &in asParent, string &in asChild, int alState)
{

PlaySoundAtEntity("", "scare_wood_creak.snt", "Player", 1.2, false);

}




void UseScript(string &in asParent, string &in asChild, int alState)
{

SetEntityActive("SlenderMan", true);

}



------------------------------------------------------------------------------------------------------
this is my script. what can i do to fix it. when i walk into the script area it will not play the sound.
12-16-2014, 12:06 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: sound script issue

This looks correct to me. The issue might be something else.

Are your script files properly formatted? They will only work in a clean text file. Even if they're named .hps, they might still have an odd format if you used a program like Word or such.

Are your in-game names and files matching? For example "Script_1", does that area (?) actually exist and is it named exactly that?

You can try to add a debug message (if you have your dev environment set up) and see if the code runs. Maybe you just can't hear the sound. Maybe it's too low or your game sounds are off.

(This post was last modified: 12-16-2014, 12:48 PM by Mudbill.)
12-16-2014, 12:47 PM
Find
G510s Offline
Banned

Posts: 58
Threads: 32
Joined: Jun 2014
#3
RE: sound script issue

(12-16-2014, 12:47 PM)Mudbill Wrote: This looks correct to me. The issue might be something else.

Are your script files properly formatted? They will only work in a clean text file. Even if they're named .hps, they might still have an odd format if you used a program like Word or such.

Are your in-game names and files matching? For example "Script_1", does that area (?) actually exist and is it named exactly that?

You can try to add a debug message (if you have your dev environment set up) and see if the code runs. Maybe you just can't hear the sound. Maybe it's too low or your game sounds are off.

I actually don't know how to set up a dev enviroment on windows. how do I do that?
12-16-2014, 01:04 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: sound script issue

https://wiki.frictionalgames.com/hpl2/am...evenvguide

12-16-2014, 01:09 PM
Find
G510s Offline
Banned

Posts: 58
Threads: 32
Joined: Jun 2014
#5
RE: sound script issue

(12-16-2014, 01:09 PM)Mudbill Wrote: https://wiki.frictionalgames.com/hpl2/am...evenvguide

is there anyway i can delete the files fro the dev user? i messed up and need to redo it. i csnt open amnesia.
12-16-2014, 01:47 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#6
RE: sound script issue

Well, you can delete the main_settings.cfg file in your Documents location. It will regenerate when you start the game.

12-16-2014, 02:25 PM
Find




Users browsing this thread: 1 Guest(s)