Frictional Games Forum (read-only)

Full Version: Sounds...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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 ?
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.
Are they in different functions? Because if so, it could be the whole function causing the issue... Post the functions (whole .hps) here?

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)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?

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

pickaxe_hit:
Code:
<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:
Code:
<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