Dj Rolnik 29 Posted October 15, 2021 Hey guys, I am trying to wrap my head around the various playMusic, say2D, playSound3D commands and am still having trouble. I would like achieve the following two things: - When a blufor player uses an action on an object, ONLY the blufor players hear a 2D sound (it has to follow the player and be heard locally, like a radio message of sort). - The same as above, but triggered when any blufor player enters a trigger. I tried various commands but am still struggling with locality of the commands. I believe that I am not using them on the correct clients, or something like that. The reason it needs to be played for side is that the mission is supposed to be PvP, so I do not want the opfor team to hear the audio. Any help will be much appreciated. Cheers! Share this post Link to post Share on other sites
7erra 629 Posted October 15, 2021 8 hours ago, Dj Rolnik said: - When a blufor player uses an action on an object, ONLY the blufor players hear a 2D sound (it has to follow the player and be heard locally, like a radio message of sort). playSound is the right option. it has local effect and is therefore only heard by the player that executed the command. To make all BLUFOR players hear it we use remoteExec: _object addAction ["Play Sound for BLUFOR", { "soundName" remoteExec ["playSound", allPlayers select {side _x == west}]; }]; The same code can be used for the trigger. 3 Share this post Link to post Share on other sites
Dj Rolnik 29 Posted October 16, 2021 Thank you @7erra, I will try this out as soon as possible! Share this post Link to post Share on other sites
opusfmspol 282 Posted October 17, 2021 On 10/15/2021 at 3:48 PM, 7erra said: allPlayers select {side _x == west} RemoteExec also targets a side, so you should just be able to put West. 1 Share this post Link to post Share on other sites
Dj Rolnik 29 Posted October 18, 2021 On 10/16/2021 at 12:48 AM, 7erra said: playSound is the right option. it has local effect and is therefore only heard by the player that executed the command. To make all BLUFOR players hear it we use remoteExec: _object addAction ["Play Sound for BLUFOR", { "soundName" remoteExec ["playSound", allPlayers select {side _x == west}]; }]; The same code can be used for the trigger. Confirmed, working just as expected. Thank you my man, much appreciated! Share this post Link to post Share on other sites
7erra 629 Posted October 18, 2021 (edited) On 10/17/2021 at 7:48 PM, opusfmspol said: RemoteExec also targets a side, so you should just be able to put West. true. But question: The following setup: Hosted MP Host is player on the east side Another player west AI created on the server for side west Execute remoteExec with west targets Isn't the AI getting targeted as well, so the sound also plays for the server, aka the host on the east side? EDIT: side works fine. as BIKI and @pierremgi say, only players are considered Spoiler Edited October 19, 2021 by 7erra 1 Share this post Link to post Share on other sites
opusfmspol 282 Posted October 18, 2021 (edited) Edit: [deleted] , deferred to @pierremgi and @7erra. Edited October 19, 2021 by opusfmspol Share this post Link to post Share on other sites
pierremgi 4905 Posted October 19, 2021 5 hours ago, 7erra said: true. But question: The following setup: Hosted MP Host is player on the east side Another player west AI created on the server for side west Execute remoteExec with west targets Isn't the AI getting targeted as well, so the sound also plays for the server, aka the host on the east side? Reveal hidden contents Read BIKI: https://community.bistudio.com/wiki/remoteExecSide - The function / command will be executed on machines where the player is on the specified side. 3 Share this post Link to post Share on other sites
7erra 629 Posted October 19, 2021 Tested it and confirmed. Edited my post above. Share this post Link to post Share on other sites