Air raid - bombing and siren

In regards to the sounds for the air raid siren, Dayz has built in air raid sirens called Sound_Alarm and Sound_Alarm2. I use these for a custom prison I've built. Is there a way to use them instead of the included sound files to make the client download smaller?
 
Using that code, you would place this line at line 56

AirraidPlayerMsg = _rndLoc; publicVariable "AirraidPlayerMsg";

But in your player_message.sqf script there is no code to determine if the player is inside of that city (_rndloc)

So you would want to replace your player_message.sqf code block
if(_city != _lastCity) then {

with something that compares if the player is within that city. something like this
//_nearestcity will be a coordinates of the closest city to a player
_nearestCity = nearestLocation [ getPos player, "nameCity"];
//_meters will be distance player to the above located nearest city. You may have to translate _nearestcity into actual worldspace though
_meters=player distance _nearestcity

//now, is player close enough to city to get messages?
if (_meters < 500) then {

or do something like this ..

As for playing the sound from in-game .. yes
I think you can use this code https://community.bistudio.com/wiki/playMusic but to check, go into your editor and create the air raid sound to play on a trigger and then see what code is produced.
 
I'm not real clear on your reply. Am I supposed to substitute "nearestLocation" and "distance" with something else? I see their in bold so I'm assuming that means I have to supply something for those. Thanks for the help on this. I'd really like to get the radio messages working.
 
i can hack it together when i get home tonight ... shouldnt be too hard.
i am not really clear about what i meant either LOL.. it was just a couple code snippet ideas.

but basically what happens is the bombing is done on the server and the meassages,are done on the client. so you have to get the city that is going to be bombed from the server onto the clients. then the clients have to test if the player is withon that city and display the messages.

so we can easily send the name of the city or the coordinates from the server to the clients using the publicvariable. but then how to test if the player is within X distance from that location and hear get the messages? that is where the distance function comes in .. just havevto fool with it until its right
 
Hey Blanks.. Im trying to call a air raid siren, say every 30 mins at NAPF airports or random cities I have the file and the CfgSounds in the description.ext.. just not real sure .. looked around.. cant find a for sure way to play the sound on a set time .. saw the air raid and bombs script don't want bombs just server wide air raid ogg to ply
 
anyone got a more "put together" tutorial for this? I cant really tell which part of the post is working or not.

also, not sure if anyone ever got the jets to fly through, but there is a module on epochmod.com called flyby that could maybe be used for that.

Thanks
 
Back
Top