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
Walking into sound area issue
Tiiwh Offline
Junior Member

Posts: 47
Threads: 6
Joined: Nov 2011
Reputation: 1
#1
Question  Walking into sound area issue

Hi Blush
I need some help with my sounds! I am making a custom story in Amnesia and I'm holding on to the old sounds and music that are already inside the game. So thanks to http://www.frictionalgames.com/forum/user-15434.html I can now easily put sounds in the level editor and script it. There is only one small little problem.
When I walk into the area where I placed the sound it starts, but then when the sound should stop and not loop it still loops and I have tried to put it into true and false, but nothing works. Here is the sound script:
void OnStart()
{
AddEntityCollideCallback("Player", "Sound_Area1", "GetSound_Area1", true, 1);
}
void GetSound_Area1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "23_saw3.snt", "Sound_Area1", 0.0f, true);
}
---
I would really appreciate it if someone could lend me a hand with this, I think it might be quite easy to solve, but since I'm a newbie I don't quite get it. Sleepy
Thanks.

[Image: deaceaf76907.gif]
(This post was last modified: 11-29-2011, 11:48 AM by Tiiwh.)
11-26-2011, 01:24 PM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#2
RE: Walking into sound area issue

Seems like that sounds perimeters bound to be a loop sound. In that case you need to manually stop the sound. You can use Timers to stop it.

Give a name to your sound, like PlaySoundAtEntity("ThisIsAName", "23_saw3.snt", "Sound_Area1", 0.0f, true);

And use StopSound("ThisIsAName"); to stop the looping sound.

11-26-2011, 02:19 PM
Website Find
Tiiwh Offline
Junior Member

Posts: 47
Threads: 6
Joined: Nov 2011
Reputation: 1
#3
RE: Walking into sound area issue

Thanks a lot! Smile

[Image: deaceaf76907.gif]
11-26-2011, 10:44 PM
Find
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#4
RE: Walking into sound area issue

(11-26-2011, 01:24 PM)Tiiwh Wrote: Hi Blush
I need some help with my sounds! I am making a custom story in Amnesia and I'm holding on to the old sounds and music that are already inside the game. So thanks to http://www.frictionalgames.com/forum/user-15434.html I can now easily put sounds in the level editor and script it. There is only one small little problem.
When I walk into the area where I placed the sound it starts, but then when the sound should stop and not loop it still loops and I have tried to put it into true and false, but nothing works. Here is the sound script:
void OnStart()
{
AddEntityCollideCallback("Player", "Sound_Area1", "GetSound_Area1", true, 1);
}
void GetSound_Area1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "23_saw3.snt", "Sound_Area1", 0.0f, true);
}
---
I would really appreciate it if someone could lend me a hand with this, I think it might be quite easy to solve, but since I'm a newbie I don't quite get it. Sleepy
Thanks.
The mention of me was very nice. XD Thank you. <3



Ba-da bing, ba-da boom.
11-27-2011, 02:39 AM
Find




Users browsing this thread: 1 Guest(s)