Arma 3
Gecko Mar 10, 2020 @ 8:28pm
Custom Audio Issue with echo
So I have custom audio in the mission I'm making, and when I test it and it comes time for the audio to play, it does, but it plays in double. Can someone please help me out with this issue? Thank you.
< >
Showing 1-5 of 5 comments
might be that whatever command you use is global and you are probably using a trigger. I'm gonna guess that you are accidentally executing it per machine and that's what gives you the multiple execution
Gecko Mar 11, 2020 @ 6:09am 
Originally posted by Drgn V4karian:
might be that whatever command you use is global and you are probably using a trigger. I'm gonna guess that you are accidentally executing it per machine and that's what gives you the multiple execution
description.ext
class rLanding { name = "rLanding"; sound[] = {"sound\rLanding.ogg", 2, 1}; titles[] = {}; };

What I have in the On Active part of the trigger:

"rLanding" remoteExec [ "playSound", 0 ];
Last edited by Gecko; Mar 11, 2020 @ 2:50pm
Gecko Mar 11, 2020 @ 4:28pm 
Originally posted by Spidy:
You hear the sound double, because your remoteExec [community.bistudio.com]
is global:

Originally posted by BI Wiki:
When 0, the function or command will be executed globally, i.e. on the server and every connected client, including the one where remoteExecCall was originated.

If you need a positional sound i would recommend say3D [community.bistudio.com]. Because its a global command you dont need it to remotexec.
I'm asuming that it'll work in multiplayer as well? If I change the number, will it play globally and only from one source? I have 10 custom sounds set up like what I currently have now. I'm thinking that if I change it to 1, then it'll limit the plays to 1 per sound since 0 usually means unlimited. I've tested it now and would rather keep what I've got rather than doing new code for 2 briefs and 8 radio messages.
Last edited by Gecko; Mar 11, 2020 @ 4:37pm
Gecko Mar 11, 2020 @ 5:33pm 
Originally posted by Spidy:
Originally posted by RedNeckTypeGamer:
0 usually means unlimited
- No, if you change it to 1 - target is not not defined:

Yes is will work in multiplayer.
For locality issues check the linked commands.

Originally posted by BI Wiki:

    targets (Optional): [default: 0 = everyone]
  • Number
  • When 0, the function or command will be executed globally, i.e. on the server and every connected client, including the one where remoteExecCall was originated.
  • When 2, it will be executed only on the server.
  • When 3, 4, 5... it will be executed on the client where clientOwner ID matches the given number.
    When number is negative, the effect is inverted. -2 means execute on every client but not the server. -12, for example, means execute on the server and every client, but not on the client where clientOwner ID is equal to 12.
  • Object - the function will be executed only where unit is local
  • String - the function will be executed only where object or group defined by the variable with passed name is local
  • Side - the function will be executed only on clients where the player is on the specified side
  • Group - the function will be executed only on clients where the player is in the specified group. In order to execute the function where group is local pass owner of the group as param:
    _myGroup remoteExec ["deleteGroup", groupOwner _myGroup];
  • Array - array of any of types listed above
So 2 then? Sorry, still learning the ins and outs of the coding portion of this stuff.
The real problem is just your understanding of locality and how triggers work. If a trigger isn't checked on server only it will evaluate on each machine locally. That means if you had a dedicated server which you would play on with your friend that would mean once the condition is met on a machine the trigger will active there. So for example if you had something in your trigger like
hint "Text";
then once your condition is met the trigger will activate and display a hint, but what people tend to forget is that the trigger will activate for each machine the condition returns true on...meaning the hint would pop for you, your friend and the server. In the example of a hint this is no problem because a hint is a local command which means it will only show on the machine its executed on, but when it comes to remote executing something with target 0 (meaning everybody)...well what happens then is that your code is executed BY everybody FOR everybody. meaning really the only thing that you'd need to do is make sure that if you remote execute something for everybody, you check the server only mark on the trigger and also make sure the command you are trying to execute is NOT a global command.

You can check this by looking up the command on the wiki and seeing about it on pretty much the top of the page (you'll usually find a EL in blue or EG in red depending if the effect of the command are global or local)
< >
Showing 1-5 of 5 comments
Per page: 1530 50

Date Posted: Mar 10, 2020 @ 8:28pm
Posts: 5