Forum Jump :

Author Message


Posts: 4
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2016-02-23 01:07        
     
Hi, I'm making a scenario where BLUFOR takes an outpost, and finalizes it by activating a trigger that saves the game and plays a sound. My problem is that only I can hear it when I host a game. Here's my code:

playSound "Alarm";
saveGame;
marker = createMarker ["CAPTURED3",position player];marker setmarkertype "hd_warning";marker setmarkersize [1, 1]; marker setMarkerColor "ColorBlue";

It plays the alarm sound, saves the game, and updates the map with a marker. Savegame and applying the marker work like a charm, but for the life of me I cannot find a way to get the sound to work for other people. Only I, the host, can hear it. I understand it's a client side issue, but I don't know of a way for everyone on the sever to hear it. The map marker does work though...what am I missing?

Here's a direct look at the trigger:
http://i.imgur.com/IOY7i4B.jpg

Thanks in advance.


Author Message


Posts: 39
Rank:


Level: Member

Country: us
Location: Miami
Occupation: US Air Force Active Duty
Age: 22
In-game name: SugarBear125

 
#2 Posted at 2016-02-23 01:29        
     
So I "BELIEVE" that is a glitch that Arma 3 currently has... It plays the sound but it only plays client side... I fixed that problem on one of my missions by making it OPFOR not present.... If you dont want to do the you can create a script on the outside of game and put all the coding in there and call for the script via trigger using null=[]execVM"scriptname.sqf"; If you don't want to do that then you can just make it so that the trigger plays the sound by clicking on effects at the bottom and in the Anonymous/Sound (whatever its called tab) you select the sound Alarm...

If that still doesn't work you can activate the sound using a waypoint.


Advertisement


Author Message


Posts: 1189
Rank:


Level: Member

Country: tr
Location:
Occupation: Computer Science student
Age: 20
In-game name: Wak

 
#3 Posted at 2016-02-23 01:38        
     
Hello Tyson, welcome to Armaholic! I think you might have a classic locality issue.

If you look at the top of both commands's wiki pages (playSound, createMarker) you can see an icon with the letter E in both, which indicates the command's effect. For createMarker it has a G that stands for global, and for playSound it has a L that stands for local.

Basically explained, commands with global effect will be broadcasted across all clients (aka globally), but local commands will stay on the computer where they were executed. Since you're hosting the game, only you get the effect of the local command. You can solve it by replacing your playSound line with this:
"Alarm" remoteExec ["playSound"];

This whole concept is called locality, and you could search "Arma 3 Locality" to find out more, or you can ask here if you'd like to find out more. If you don't want to deal with all the learning, just familiarize yourself with the remoteExec command and you should be able to solve most of these problems by yourself.

Sometimes I like to think as I started the whole "earplugs" thing.

W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.

#define getDamage getDammage

Author Message


Posts: 39
Rank:


Level: Member

Country: us
Location: Miami
Occupation: US Air Force Active Duty
Age: 22
In-game name: SugarBear125

 
#4 Posted at 2016-02-23 01:54        
     
Well 654wak654 that makes my life so much easier lol. I've been solving these local problems by doing what I stated above... Many Thanks


Author Message


Posts: 4
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#5 Posted at 2016-02-23 02:23        
     
# 654wak654 : Hello Tyson, welcome to Armaholic! I think you might have a classic locality issue.

If you look at the top of both commands's wiki pages (playSound, createMarker) you can see an icon with the letter E in both, which indicates the command's effect. For createMarker it has a G that stands for global, and for playSound it has a L that stands for local.

Basically explained, commands with global effect will be broadcasted across all clients (aka globally), but local commands will stay on the computer where they were executed. Since you're hosting the game, only you get the effect of the local command. You can solve it by replacing your playSound line with this:
"Alarm" remoteExec ["playSound"];

This whole concept is called locality, and you could search "Arma 3 Locality" to find out more, or you can ask here if you'd like to find out more. If you don't want to deal with all the learning, just familiarize yourself with the remoteExec command and you should be able to solve most of these problems by yourself.

This is literally the most helpful post I have seen in a long time in general regards. Thank you so much! Awesome interaction for my first time on the forum. Taught me 3 new tricks in the most direct way possible(:

And Suger, I'll look into making opfor not present, that'd help with blufor accidentally running to close to the flag before all opfor all eliminated and saving the game. Looking to have blufor spawn in later as well, so that'd cover all my bases(:

Thank you both! Time to get back to testing!