Jump to content
Sign in to follow this  
1para{god-father}

Addaction and playsound

Recommended Posts

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 ?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

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  

×