Playing Sounds by the Player

Grafzahl

Valued Member!
Hi,

also no one could help me on my last threads, i hope this time someone can answer me ;)

I created a addAction in my mission.pbo, so everyone has a Point "Say Hello" in theire Scroll-Menu, when you activate this Option your Player says "Hello, i am friendly!", like he would speak in direct channel.

So, i added this to my init.sqf

Code:
if (!isDedicated) then {
[] execVM "fixes\addSoundOption.sqf";
}

addSoundOption.sqf
Code:
while {true} do
{
    if (!isNull player) then
    {
                _isAction = player getVariable ["TAG_ActionAdded", false];
                if (!_isAction) then
                {
                    _actionid = player addAction ["<t color='#0096ff'>Say Friendly</t>", "fixes\sayfriendly.sqf", [], -1, false, true, "", ""];
                    player setVariable ["TAG_ActionAdded", true];
                };
        }
}

and finaly, sayfriendly.sqf does currently only

Code:
player say ["friendly", 40];

Works great, you have the Scroll-Wheel-Option and the Player says "Hello, i am friendly", and even starts the Lip-Sync, but no player nearby can hear anything, but he should normaly hear it in a radius of 40m, is player only a local-object on the client? Do i have to create a new vehicle like "HeliEmpty" on the position of the player that plays the sound once? Or does only say3d work in multiplayer?
 
Dont get me wrong, but i think i will just ask questions like these in the official arma2 scripting-forums, seems like no one here can help me with anything script-related (or doesnt want to), only if i publish something by myself, i get responses how to this or that working. Didnt realy get any answers on one of my question-threads ^^
 
Do you have the sound added in a class ? Have not done much with sounds beyond using the dogs from piXel's mission addon. Check out his descrExt.h in the dogs folder, it classifies the .ogg file which is then called in the script.

I don't see a sound in your sayfriendly.sqf ? http://community.bistudio.com/wiki/say

And, give people a chance, nobody is being paid here and all have a life outside that insists on being lived (as much as I would like to do this all day), it is all because we love the game and what we do. We wouldn't be coding into the early hours if not :)
 
Back
Top