Air raid - bombing and siren

Nah, that doesn't make any sense.

Someone playing on my server told me that they are able to hear the explosions, but that the explosions are not very loud. I'm still unable to hear them at all, though. This makes me very sad.

Wait! Is it possible to call to an ogg file with the sound of an explosion whenever the explosion is initiated? What might that line of code look like? I'm guessing it would go somewhere in here:

Code:
//start bombing
_pos2 = [getPosATL _siren];
While {_seconds > 1} do {
_sound = createVehicle ["HeliHEmpty",position _target,[], _ray, "NONE"];
[nil,_sound,rSAY,['mortar1', 3500]] call RE;
_pos2 set [_seconds, getPosATL _sound];
sleep 2;
If (_choise == 1) then {
_espl = createVehicle ["SH_105_HE",position _sound,[], 0, "NONE"];
[B](((Something right here)))[/B]
};
If (_choise == 2) then {
_espl = createVehicle ["SH_125_HE",position _sound,[], 0, "NONE"];
};
If (_choise == 3) then {
_espl = createVehicle ["BO_GBU12_LGB",position _sound,[], 0, "NONE"];
};
_pos2 = [_dblsecs,getPosATL _espl];
_pos2cnt = count _pos2;
diag_log format ["AIRRAID: BOMB: %1 | TARGET: %2 | SHOULD MATCH APPROX ||| debug arraycount %3 |",str(_pos2),_targetpos,_pos2cnt];
_seconds = _seconds - 1;
deletevehicle _sound;
};

And then I would just add the little piece of corresponding code that goes in my description.ext
Please help me.
 
I've had a lot of fun with this script and used it in a couple of server events :)

I've been looking for a way to get an AI helicopter "taxi" service working.

I tried modifying Axeman's AI bus route, but I couldn't figure out how to get the helicopter to land at the stops.

So, I've fooled around with this script. I have the helicopter flying to stops, landing, and waiting a set amount of time for passengers. Unfortunately, when a player gets into the helicopter, the helicopter despawns, leaving a crator, and the pilot just standing there.

Is there a change I can make to the script, that will allow passengers to board or get out without disrupting the route?

Thanks.
 
Hi All,

I have read pretty much most of the pages of this topic and think I could scrounge it all together to implement it, but before I do I was wondering if anyone had written a full and comprehensive setup guide lately seeing as there's bits and pieces its seems through out this entire topic that are important to make it work.

I'm very much looking forward to trying it out.

Cheers.​
I'm wondering the same thing!!
 
Ok so, I had a bit of trouble finding a comprehensive all in one how to set this up guide and most of the info is scattered throughout here from when it was being developed. Here is what I did to get this working after combining all the instructions from here that I could and figuring some stuff out on my own. I'm a new server admin and new to all of this stuff so I shall approach this doco from that perspective and allow you to copy and paste as much as possible. A wall of text follows.

I run an Epoch 1.2.04 server at the time of writing so some things are possibly different for you. They are usually similar though.

The best way to run this is from your dayz_server.pbo. There are a few steps to make this happen. They are as follows:

1 - Create a new sqf calling it server_airRaid.sqf. Paste into it code from http://pastebin.com/u6AXjDBz, making changes to the configuration so the bombings occur how you want them to as specified in the notes included in the file. Its pretty self explanatory as to what to change and configure.

2 - Open your dayz_server.pbo using a program such as PBO Manager (http://www.armaholic.com/page.php?id=16369). Drag the newly created server_airRaid.sqf into the compile folder.
If it wont let you, drag one file out, accept that you are breaking the encryption and then drag both files back in. Its important that you drag and drop, extracting the pbo and compressing it again will break it without doing some other tweaks which I wont go into.

3 - Take the server_monitor.sqf out of the pbo (found in the system folder) for editing and find the code that controls the heli crash spawns. Mine looks like this:
Code:
    // [_guaranteedLoot, _randomizedLoot, _frequency, _variance, _spawnChance, _spawnMarker, _spawnRadius, _spawnFire, _fadeFire]
    if(OldHeliCrash) then {
        nul = [3, 4, (50 * 60), (15 * 60), 0.75, 'center', HeliCrashArea, true, false] spawn server_spawnCrashSite;
    };
And paste in nul = [] spawn server_airRaid; below it so it looks like this:
Code:
    // [_guaranteedLoot, _randomizedLoot, _frequency, _variance, _spawnChance, _spawnMarker, _spawnRadius, _spawnFire, _fadeFire]
    if(OldHeliCrash) then {
        nul = [3, 4, (50 * 60), (15 * 60), 0.75, 'center', HeliCrashArea, true, false] spawn server_spawnCrashSite;
    };
 
    nul = [] spawn server_airRaid;

Save and drag the server_monitor.sqf back into the pbo.

3 - Next, bring out the server_functions.sqf file for editing which is located in the init directory. The original instructions from mmmyum say to add this next part of code below the spawn_carePackages line, but I don't have that so I have placed it under the heli crashes line.
Find
Code:
server_updateNearbyObjects =    compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_updateNearbyObjects.sqf";
server_spawnCrashSite  =    compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnCrashSite.sqf";

Place under it server_spawnCrashSite = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnCrashSite.sqf";

So it looks like
Code:
server_updateNearbyObjects =    compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_updateNearbyObjects.sqf";
server_spawnCrashSite  =    compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnCrashSite.sqf";
server_airRaid =            compile preprocessFileLineNumbers "z\addons\dayz_server\compile\server_airRaid.sqf";

4 - Bring out server_cleanup.sqf for editing from the system folder. Find the section that aims to kill hackers. It can look like this
Code:
"  if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"" then {" \n

and change it to (remember this is for Epoch 1.2.04 and I have missions running. The important part to add is the Sarge part)
Code:
if(vehicle _x != _x && (vehicle _x getVariable [""Mission"",0] != 1) && !(vehicle _x in _safety) && (isPlayer _x) && (vehicle _x getVariable [""Sarge"",0] != 1) && !((typeOf vehicle _x) in DZE_safeVehicle)) then {" \n

This is all for the dayz_server.pbo, we now move to the mission file for the sounds.

Some hosting providers have the mission in a pbo, others have it unpacked. Mine is unpacked but if yours isn't then operate your editing much the same as you did for the server pbo.

5 - In the mission folder, create a folder called sound. Paste into it the sounds from here http://mmmyum.info/sound.zip

6 - Now we edit the description.ext file. I am going to assume that you have no pre-existing sounds configured, if you do then you will need to merge the following instead. Add to the bottom of your description.ext file the following:
Code:
class CfgSounds
{
    sounds[]={nam,eve,puk};
    class nam
    {
        name = "Siren1";
        sound[] = {sound\SirenLoopMono.ogg, db+5, 1.0};
        titles[] = {""};
    };
    class eve
    {
        name = "Siren2";
        sound[] = {sound\Sirens.ogg, db+5, 1.0};
        titles[] = {""};
    };
    class puk
    {
        name = "Siren3";
        sound[] = {sound\Sirens2.ogg, db+5, 1.0};
        titles[] = {""};
    };
};

You may need to adjust the db settings if you cant here the sirens or its too loud. +5 works well for me. Save the file and that should be it.


I made what I felt were important adjustments to this. I found helicopters to be too unrealistic to be doing bombings, especially the ones being used. I changed it to use the SU-25 and the A-10 as they are vehicles that can be called on by AI in an Epoch server without any BEC issues etc. I also made it so they flew fast and low to their target and made them travel via a few waypoints first so that they could be seen by more players.
In order to do this I had to prevent the script from wanting to lower the vehicle to the ground where it would drop off AI if you had configured it to do so and change the speed settings. The way points are already part of the changeable settings provided. So this is the server_airRaid.sqf I use with all of my settings as they are. Its a bit bastardised in some parts but it does what I want. http://pastebin.com/GtTjWBNP
I also removed Stary as a bombing target due to the traders being located there and changed the script to use a single siren sound (https://docs.google.com/file/d/0B8s_adm7dSFSejFiNEVBMmFtMXc/edit?usp=sharing) to save space on the mission file download. Its not as good but meh.

Here also is my desctiption.ext, or the part you need to add to the end I should say.
Code:
//sounds
class CfgSounds
{
      sounds[]={nam};
 
    class nam
    {
            name = "Siren1";
            sound[] = {\sound\SirenLoopMono.ogg, db+5, 1.0};
            titles[] = {""};
      };
 
};

Good luck! Hopefully I didn't forget anything. And thank you to mmmyum and all his contributors for a great script!

Black_Sheep
 
Ok so, I had a bit of trouble finding a comprehensive all in one how to set this up guide and most of the info is scattered throughout here from when it was being developed. Here is what I did to get this working after combining all the instructions from here that I could and figuring some stuff out on my own. I'm a new server admin and new to all of this stuff so I shall approach this doco from that perspective and allow you to copy and paste as much as possible. A wall of text follows.


Black_Sheep

hey just followed your instructions and worked great on my 1.0.2.5 epoch server, thanks!

1 question, the first example i saw on my server the bombs went off at least 10 seconds after the plane flew over. There was a noticeable delay, its possible it was a fluke for the first time. anyway thanks again
 
how would I increase the time for the sirens from the time the city is chosen it 1.5 mins to bombing I would like to increase this to a 5 mins how would I go about doing this. Thanks.
 
Just wondering, i got this to work on my private server for a few friends and it seems whenever a city is bombed some of the buildings are destroyed which i know is realistic, but i was wondering if theres anyway to stop it from destroying the buildings :)
 
Just wondering, i got this to work on my private server for a few friends and it seems whenever a city is bombed some of the buildings are destroyed which i know is realistic, but i was wondering if theres anyway to stop it from destroying the buildings :)

Unfortunately, there is not. The buildings being destroyed is not an effect, it's an event built into the game itself. Using any form of explosive on a building will destroy it.
 
Everything is working perfectly except the bomb sound isn't working. Sirens and missiles dropping sounds work but not the actual explosion.
 
I keep getting an error on my overwatch server saying sound eve not found. I have installed this on many servers and never had this issue. The bombs are works but no sirens any idea?
 
Last edited:
I have problems with Epoch 1.0.4.2 !
I have the following error message in my Server Log :
Code:
22:06:09 "AIRRAID: BOMBER: MQ-9  POS: [13925.6,11315.6,0.610672] end moving to Pre-target Waypoint at [9245.55,13955.8] ( TIME: 197 )"
22:06:09 "AIRRAID: BOMBER DESTROYED: MQ-9"
22:06:09 "AIRRAID: INCOMING ATTACK: Sounding Siren at: [12290.8,10904.3,1.5] [C 1-1-A,1]"
22:06:09 "AIRRAID: BOMBER: MQ-9 is at [13925.6,11315.6,0.610672]!"
22:06:11 "AIRRAID: BOMBER: DISTANCE: 1688.26 | POSITION: [13925.6,11315.6,0.610672]"
22:06:11 "AIRRAID: BOMBER DESTROYED: MQ-9"
22:06:12 "CLEANUP: INITIALIZING CLEANUP SCRIPT"
22:06:54 "AIRRAID: BOMBER: DISTANCE: 1688.26 | POSITION: [13925.6,11315.6,0.610672]"
22:07:38 "AIRRAID: BOMBER: MQ-9 Bombing Initialize: arrived at [13925.6,11315.6,0.610672]!, "
22:07:43 "AIRRAID: BOMBER DESTROYED: MQ-9"
22:07:55 "AIRRAID: BOMBER: MQ-9 has Completed Bombing at [13925.6,11315.7,0.610362]!"
22:07:55 "AIRRAID: BOMBER DESTROYED: MQ-9"
22:08:03 "AIRRAID: BOMBER: MQ-9 Leaving Area [13925.6,11315.7,0.610362]"
22:09:03 "AIRRAID: BOMBER: DISTANCE SAFETYPOINT: 394.277 | POSITION: [13925.6,11315.7,0.610362]"
22:10:04 "AIRRAID: END CYCLE: Going down for sleep: Repeat:47 | Sleep:2760"

The Bombers crashes immediately before bombing !
 
SCRIPT ADDITION
OK, thanks to help from @AxeCain we now have a working warning message system!
Simply run's a cuttext warning on each client who has a radio - warning of next location to be bombed.
You'll need to run a new script on each client (put in mission init under if (!isDedicated) and execVM)

http://pastebin.com/0EaJrjSt

In the top of the file is a comment explaining how to add one line of code to server_airraid.

WARNING: NOT FOR NOOBS - working great, needs more heavy testing on a fully populated server, but is still alpha quality.

I added this to my init.sqf:

Code:
[] execVM "custom\airraid\player_radioMessage.sqf";

I put the player_radioMessage.sqf into a folder called custom\airraid (Same place that I put the sound files)

I get no message even though I have a radio. The airraids are working.
 
only glanced at this. at the top of the pastebin it says to add a publicvariable .. did you?

the code in what you pasted has this
  1. _city = AirraidPlayerMsg;
  2. _playerRadio = "ItemRadio"in items player;
  3. if (_playerRadio) then {
  4. if (_city !=_lastCity) then {
if airraidplayermessgae is not ddefined by the publicvariabe then _city will be null and the if block will never execute
 
only glanced at this. at the top of the pastebin it says to add a publicvariable .. did you?

the code in what you pasted has this
  1. _city = AirraidPlayerMsg;
  2. _playerRadio = "ItemRadio"in items player;
  3. if (_playerRadio) then {
  4. if (_city !=_lastCity) then {
if airraidplayermessgae is not ddefined by the publicvariabe then _city will be null and the if block will never execute

I didn't write the code in the pastebin. I only created an sqf on my server with the code that person provided. I assumed since it was posted there as a working script, that it actually worked.
 
it looks to be only one of 2 required scripts. you need the server_airriad.sqf i think

Yeah, I already have the server_airRaid.sqf script working just fine. My quote was a post that tells how to add radio messages to that script. The messages aren't being displayed and I have it set up as per the instructions.
 
Okay> so you did add this line to your server_airraid.sqf file as instructed ?
AirraidPlayerMsg = _city;
publicVariable "AirraidPlayerMsg";

I would put it right below this line (#128)
_city = _loc select 0;

If you did not do that, then there is no city being broadcast to all the players and therefore no message. If you did do that, then there must be errors in your RPT log?
 
Okay> so you did add this line to your server_airraid.sqf file as instructed ?
AirraidPlayerMsg = _city;
publicVariable "AirraidPlayerMsg";

I would put it right below this line (#128)
_city = _loc select 0;

If you did not do that, then there is no city being broadcast to all the players and therefore no message. If you did do that, then there must be errors in your RPT log?

My server_airRaid.sqf doesn't have a line that says

Code:
_city = _loc select 0;

This is where I got the script from. I use the air raid static/random bomber: http://opendayz.net/threads/air-raid-bombing-and-siren.12531/
 
Back
Top