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


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sounds...
Author Message
tklamka Offline
Junior Member

Posts: 11
Joined: Dec 2010
Reputation: 0
Post: #1
Sounds...

How do the sounds work ? Even though there is no mistake in the script, some sounds get played, and some do not.

Eg., the line

PlaySoundAtEntity("", "23_saw2.snt", "Player", 0, false); does not work, but

PlaySoundAtEntity("", "pickaxe_hit.snt", "Player", 0, false); does work.


is there any rule in using sounds ? maybe som can not be played on " Player " ?

Any ideas ?
01-11-2012 08:17 PM
Find all posts by this user Quote this message in a reply
Tanshaydar Offline
From Beyond

Posts: 3,085
Joined: Mar 2009
Reputation: 67
Post: #2
RE: Sounds...

Moved to correct forum.
Sounds can be played on Player, that's not a problem. However, some sound files have different configurations. You can open up .snt files in any text editor to see them.

01-11-2012 09:25 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Statyk Offline
Schrödinger's Mod

Posts: 4,391
Joined: Sep 2011
Reputation: 241
Post: #3
RE: Sounds...

Are they in different functions? Because if so, it could be the whole function causing the issue... Post the functions (whole .hps) here?
01-11-2012 09:35 PM
Find all posts by this user Quote this message in a reply
tklamka Offline
Junior Member

Posts: 11
Joined: Dec 2010
Reputation: 0
Post: #4
RE: Sounds...

void UseSaw(string &in asItem, string &in asEntity)
{

SetEntityActive("Saw4", true);
PlaySoundAtEntity("", "23_saw2.snt", "Player", 0, false);
AddTimer("Timer1", 0.5, "Saw1");
AddTimer("Timer2", 1, "Saw2");
AddTimer("Timer3", 1.5, "Saw3");
AddTimer("Timer4", 2, "Saw4");



}

It definitely works, other commands work as they should
01-11-2012 10:21 PM
Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,281
Joined: Apr 2011
Reputation: 57
Post: #5
RE: Sounds...

(01-11-2012 10:21 PM)tklamka Wrote:  void UseSaw(string &in asItem, string &in asEntity)
{

SetEntityActive("Saw4", true);
PlaySoundAtEntity("", "23_saw2.snt", "Player", 0, false);
AddTimer("Timer1", 0.5, "Saw1");
AddTimer("Timer2", 1, "Saw2");
AddTimer("Timer3", 1.5, "Saw3");
AddTimer("Timer4", 2, "Saw4");



}

It definitely works, other commands work as they should
Did you restart Amnesia before trying it again?

01-12-2012 02:20 AM
Find all posts by this user Quote this message in a reply
tklamka Offline
Junior Member

Posts: 11
Joined: Dec 2010
Reputation: 0
Post: #6
RE: Sounds...

3 times Smile
01-12-2012 03:45 PM
Find all posts by this user Quote this message in a reply
Inurias Offline
Junior Member

Posts: 20
Joined: Jan 2012
Reputation: 2
Post: #7
RE: Sounds...

Like Tanshaydar already said, these sounds are using different configurations.

pickaxe_hit:
<PROPERTIES Volume="1" MinDistance="1" MaxDistance="10" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="false" Loop="false" Use3D="False" Blockable="False" BlockVolumeMul="0.5" Priority="0" />

23_saw2:
<PROPERTIES Volume="0.8" MinDistance="5" MaxDistance="40" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="false" Loop="True" Use3D="True" Blockable="False" BlockVolumeMul="0.5" Priority="0" />

I would try changing the distance and 3D properties or just using the same configuration for both. However, there may be another way to avoid doing that.

-Inurias
01-12-2012 04:04 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)