PDA

View Full Version : Addaction and playsound



1PARA{God-Father}
Aug 10 2011, 19:23
I have a addaction that runs a script and in that I have the following



playsound "blownammo";


This all works great when testing on my PC but when i pop it on a dedi i get no sound ?

any idea why ?

MelvinNor
Aug 10 2011, 19:30
Hello,

addAction is local, so what you need to do is make it global. The multiplayer framework is a good tool for that (http://community.bistudio.com/wiki/Multiplayer_framework)

To make it work you place the functions module in the editor and use rPlaysound (it is supported by multiplayer framework) in your script.

it should look like



waituntil { !isNil "BIS_fnc_init" };
[nil,nil,rPlaysound,"blownammo"] call RE;

and that should work.

Kind regards,
Melvin

Demonized
Aug 10 2011, 19:32
most likely because playsound is a local command and addaction is local too, though you should hear the sound then...
do you have anything exiting in the script?
like

if (!isServer) exitWith {};
that would make only server hear the sound and on dedi thats no players...

show the full addaction script for more debugging, as its only guesswork at this point.

Edit: ninjaed, and yeah, MP framework would do the job.