Jump to content
Sign in to follow this  
marinesrule1980

.ogg file plays over entire map not local

Recommended Posts

How do I make my ogg file play like other sounds that play and are only heard if the player is standing next to it.

The sound plays great but when activated by a player the sound can be heard by everyone where ever they are on the map.

I've searched BIS and Armaholic and I've read tons and tons of helpful pages about sound but none that address this perticular issue I am having.

When I converted it to ogg I made sure it was mono, 44100 and it is 98kb.

I'm a very new to making maps and so I know it must be a simple fix, I just don't know what it is.

I created trigger: Condition: this On Act: PlaySound "skin";

I tried setting the effects Voice and anonymous to skin, but no luck, it plays great but still plays over entire map.

How do I get the sound to play only at that location of the trigger and only the play near it hears it not everyone on the map?

Here is what is in the description ext.

class CfgSounds

{

// List of sounds (.ogg files without the .ogg extension)

sounds[] = {airplane, attent1, mhymn, reaper1, skin, somefun};

// Definition for each sound

class airplane

{

name = "airplane"; // Name for mission editor

sound[] = {\sounds\airplane.ogg, db + 0, 1.0};

titles[] = {0, ""};

};

class attent1

{

name = "attent1"; // Name for mission editor

sound[] = {\sounds\attent1.ogg, db + 0, 1.0};

titles[] = {0, ""};

};

class mhymn

{

name = "mhymn"; // Name for mission editor

sound[] = {\sounds\mhymn.ogg, db + 0, 1.0};

titles[] = {0, ""};

};

class reaper1

{

name = "reaper1"; // Name for mission editor

sound[] = {\sounds\reaper1.ogg, db + 0, 1.0};

titles[] = {0, ""};

};

class skin

{

name = "skin"; // Name for mission editor

sound[] = {\sounds\skin.ogg, db + 0, 1.0};

titles[] = {0, ""};

};

class somefun

{

name = "somefun"; // Name for mission editor

sound[] = {\sounds\somefun.ogg, db + 0, 1.0};

titles[] = {0, ""};

};

};

Thanks for any help on this.

Share this post


Link to post
Share on other sites

One popular way to do this is to get the players withing the trigger and query if the current player the onAct-field is executed on is in that list.

Your onAct-field would look like this:

if (player in thisList) then {playSound "skin";};

Share this post


Link to post
Share on other sites

Then it would only play for that one and the rest would not hear it? I guess that would mean I'd have to add all 123 slots I have for the players.

How is it that other sounds in the game are only heard by those players that are near the sound?

Share this post


Link to post
Share on other sites

[s1,nil,rSay,"jet"] call RE;

Where s1 is an object or unit

say is local where only if the player is close by will he hear the sound, this way the say command is broadcasted to all clients and anyone close by will hear th e sound

waitUntil{!(isNil "BIS_MPF_InitDone")};

Include this line in your init file also place functions module via editor

Info http://community.bistudio.com/wiki/Multiplayer_framework

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×