Jump to content
dlegion

BUG playSound3D : no longer global ?

Recommended Posts

hello guys. i have a script , untouched in the last year, that was producing sound on dedicated MP. 
i noticed today that is no longer the case.
if i run the mission in editor MP , i hear the sound, but in a dedicated MP it no longer works.
i'm sure months ago it was working correclty on dedicated MP.

here the code i use:
 


playMusic ["02",15];        //stop music
_root = parsingNamespace getVariable "MISSION_ROOT";
_soundToPlay = _root + "music\MYSOUND.ogg";
playSound3D [_soundTOplay,(_this select 0), false,(getpos (_this select 0)), 20, 1, 250];

any idea of whats wrong ? thanks!
 

Share this post


Link to post
Share on other sites

You have to put variable in parsing namespace first before you read it from it, have you done that?

 

also volume is recently limited to max 5 you have 20

  • Thanks 1

Share this post


Link to post
Share on other sites

Ah, thanks for the help man !

Im still noob, and have no idea of what you mean with 

put variable in parsing namespace first

I just tested now with volume 5, and same result.

The weird part is that it was working in the past ....

Share this post


Link to post
Share on other sites

@dlegion I was having wierd issues like this with it way back when. The cause ended up being the use of a soundPosition posAGL instead of posASL. 

 

Try switching out your getPos with getPosASL. 

  • Thanks 1

Share this post


Link to post
Share on other sites

Ahh thanks for the info !!

Ill try and report back !

Share this post


Link to post
Share on other sites

sadly...no changes.
it works in MP editor…..but does not hear the sound in dedicated server.

Share this post


Link to post
Share on other sites

ok i tried this:
 

playSound3D [_soundTOplay,(_this select 0), false];

and it works on dedicated.
so you are right...it mess somehow with getpos (or getposASL)...because without that i hear the sound also on dedicated .
now..being me very noob…. how can i "skip" the optional getpos and still set the volume and range options ?
 

playSound3D [_soundTOplay,(_this select 0), false,PART TO SKIP, 5, 1, 250];         // HOW DO SOMETHING LIKE  THIS ?

thanks !

Share this post


Link to post
Share on other sites

Simply reference the object in that parameter also:
 

playSound3D [_soundTOplay,(_this#0), false,(_this#0), 5, 1, 250];

 

  • Thanks 1

Share this post


Link to post
Share on other sites

works perfectly also in dedicated server !
great, thanks for the help man, problem solved !!

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

×