Air raid - bombing and siren

I call it through init.sqf so maybe why sound not being called??
I mentioned that might be a possibility to someone else stig, do you think you could give the mission.sqm way a try? As I said, I'm still learning, and locality can be confusing - so maybe calling via init.sqf is no good?

stig, I'm also just now going to update the random bombing script (no chopper, no ai) so it gives proper information about where the sirens are being created, the bomb sounds and the bombs. Give me like 20 mins or so and I'll post it here, and update the OP with it, just smoothing out a bug where something isn't showing its location.

One last thing, I said no requirements, but I'm not 100% as i've never installed it alone on vanilla. It may need something else I've changed somewhere, I've just set up a couple more local server instances to test on, so I will report back if I find anything.
 
@mmmyum

Ok cool

Cheers
Here we go. Just tested. Now in your rpt log it will show everything - where the siren actually is, where the bombs are being dropped (Each one), the target that is selected, etc.

NEWLY DEBUGGED RANDOM AIRRAID SCRIPT * don't forget the cfgSound and sound folder from OP
NEWEST update (april 26 2013 2pmEST) below
Code:
////////////////////////////////////////////////////////////////////////////////////////
//      DayZ Air Raid written by                                                    //
//              mmmyum    with    work    from                                      //
// sirens: http://www.armaholic.com/page.php?id=12598 by DarkXess                    //
// bombs: http://www.armaholic.com/page.php?id=15612 by Maxjoiner                    //
////////////////////////////////////////////////////////////////////////////////////////
 
/////////////////////////SETUP repeat and break
 
private ["_espl","_sound","_pos2","_pos2cnt","_seconds","_rndLoc","_place","_position","_choice","_duration","_xpos","_ypos","_targetpos","_loc","_target","_pos","_siren","_pos1","_choise","_ray","_dblsecs","_repeat","_break"];
sleep 10;
_repeat = 30;                            //times to repeat
_break = 120;                            //time to break between attacks
_position = [13135.9, 10393.3, 1.5]; //leave this
_xpos = 13135.9;
_ypos = 10393.3;
//repeat script
diag_log format ["AIRRAID: Starting..."];
sleep 2;
While {_repeat > 1} do {
/////////////////////////SETUP position
//                                      enter positions below. format x,y,z
    _rndLoc=floor(random 6);
    _place=
    switch (_rndLoc) do
    {
      case 0: {"Electro"};
      case 1: {"Berezino"};
      case 2: {"NEAF"};
      case 3: {"Stary"};
      case 4: {"Vybor"};
      case 5: {"Gorka"};
    };
    diag_log format ["AIRRAID: Random Location: %1 | %2",_rndLoc,_place];
    _position=
    switch (_rndLoc) do
    {
      case 0: {[10480.6, 2217.8, 1.5]};
      case 1: {[12043.9, 9091.3, 1.5]};
      case 2: {[12073.9, 12724.3, 1.5]};
      case 3: {[6143.6, 7721.5, 1.5]};
      case 4: {[3815.1, 8865.0, 1.5]};
      case 5: {[9659.0, 8795.3, 1.5]};
    };
//////////////////////////SETUP type of bombing and duration
_choice = 1;
_duration = 60;
/////////////////////////
_xpos = _position select 0;
_ypos = _position select 1;
_targetpos = [_xpos, _ypos, 1.5];
_loc = createVehicle ["HeliHEmpty", _targetpos,[], 0, "NONE"];
_target = createVehicle ["HeliHEmpty",position _loc,[], 0, "NONE"];  // target bombing
sleep 2;
diag_log format ["AIRRAID: INCOMING ATTACK: Sounding Siren at: %1 %2 | Repeat: %3| Type: %4 | Duration: %5",_xpos,_ypos,_repeat,_choice,_duration];
 
 
//sound siren
_pos = position _target;
diag_log format ["AIRRAID: POS: %1 | TARGET: %2 | SHOULD MATCH",_pos,_targetpos];
_siren = createVehicle ["HeliHEmpty",position _target,[], 0, "NONE"];
[nil,_siren,rSAY,['eve', 3500]] call RE;
sleep 60;
_pos1 = position _siren;
diag_log format ["AIRRAID: SIREN: %1 | TARGET: %2 | SHOULD MATCH APPROX",_pos1,_targetpos];
[nil,_siren,rSAY,['puk', 3500]] call RE;
sleep 60;
[nil,_siren,rSAY,['eve', 3500]] call RE;
sleep 60;
[nil,_siren,rSAY,['nam', 3500]] call RE;
sleep 10;
[nil,_siren,rSAY,['puk', 3500]] call RE;
sleep 60;
[nil,_siren,rSAY,['nam', 3500]] call RE;
sleep 5;
 
//start bombing init
_choise = _choice;    // choise bombing: 1 = light 2 = medium 3 = heavy
_ray = 120;          // ray of bombing
_seconds = _duration; // time bombing
_dblsecs = _seconds * 2;
diag_log format ["AIRRAID: Bombing Area: %1 %2",_xpos,_ypos];
 
//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"];
};
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;
};
 
//cleanup
sleep 60;
_repeat = _repeat - 1;
deletevehicle _espl;
deletevehicle _siren;
deletevehicle _loc;
deletevehicle _target;
diag_log format ["AIRRAID: Going down for sleep: Repeat:%1 | Sleep:%2",_repeat,_break];
sleep _break;                     
};
exit

ABOVE - this code should give you sirens playing


BELOW - old code, I don't think sirens will play properly

(april 25 2013 4pm)
I have had success calling it through the mission.sqm.
Code:
////////////////////////////////////////////////////////////////////////////////////////
//      DayZ Air Raid written by                                                    //
//              mmmyum    with    work    from                                      //
// sirens: http://www.armaholic.com/page.php?id=12598 by DarkXess                    //
// bombs: http://www.armaholic.com/page.php?id=15612 by Maxjoiner                    //
////////////////////////////////////////////////////////////////////////////////////////
 
/////////////////////////SETUP repeat and break
 
private ["_espl","_sound","_pos2","_pos2cnt","_seconds","_rndLoc","_place","_position","_choice","_duration","_xpos","_ypos","_targetpos","_loc","_target","_pos","_siren","_pos1","_choise","_ray","_dblsecs","_repeat","_break"];
sleep 10;
_repeat = 30;                            //times to repeat
_break = 120;                            //time to break between attacks
_position = [13135.9, 10393.3, 1.5]; //leave this
_xpos = 13135.9;
_ypos = 10393.3;
//repeat script
diag_log format ["AIRRAID: Starting..."];
sleep 2;
While {_repeat > 1} do {
/////////////////////////SETUP position
//                                      enter positions below. format x,y,z
    _rndLoc=floor(random 6);
    _place=
    switch (_rndLoc) do
    {
      case 0: {"Electro"};
      case 1: {"Berezino"};
      case 2: {"NEAF"};
      case 3: {"Stary"};
      case 4: {"Vybor"};
      case 5: {"Gorka"};
    };
    diag_log format ["AIRRAID: Random Location: %1 | %2",_rndLoc,_place];
    _position=
    switch (_rndLoc) do
    {
      case 0: {[10480.6, 2217.8, 1.5]};
      case 1: {[12043.9, 9091.3, 1.5]};
      case 2: {[12073.9, 12724.3, 1.5]};
      case 3: {[6143.6, 7721.5, 1.5]};
      case 4: {[3815.1, 8865.0, 1.5]};
      case 5: {[9659.0, 8795.3, 1.5]};
    };
//////////////////////////SETUP type of bombing and duration
_choice = 1;
_duration = 60;
/////////////////////////
_xpos = _position select 0;
_ypos = _position select 1;
_targetpos = [_xpos, _ypos, 1.5];
_loc = createVehicle ["HeliHEmpty", _targetpos,[], 0, "NONE"];
_target = createVehicle ["HeliHEmpty",position _loc,[], 0, "NONE"];  // target bombing
sleep 2;
diag_log format ["AIRRAID: INCOMING ATTACK: Sounding Siren at: %1 %2 | Repeat: %3| Type: %4 | Duration: %5",_xpos,_ypos,_repeat,_choice,_duration];
//sounds
_pos = position _target;
diag_log format ["AIRRAID: POS: %1 | TARGET: %2 | SHOULD MATCH",_pos,_targetpos];
_siren = createVehicle ["HeliHEmpty",position _target,[], 0, "NONE"];
_siren say ["eve",1000];                                                        // siren sound
sleep 60;
_pos1 = position _siren;
diag_log format ["AIRRAID: SIREN: %1 | TARGET: %2 | SHOULD MATCH APPROX",_pos1,_targetpos];
_siren say ["puk",1000];                                                        // siren sound
sleep 60;
_siren say ["eve",1000];                                                        // siren sound
sleep 60;
_siren say ["nam",1000];                                                        // siren sound
sleep 60;
_siren say ["puk",1000];
sleep 60;                                                                      // wait a while
_siren say ["nam",1000];
sleep 5;                                                                      //thats enough warning
 
//start bombing init
_choise = _choice;    // choise bombing: 1 = light 2 = medium 3 = heavy
_ray = 120;          // ray of bombing
_seconds = _duration; // time bombing
_dblsecs = _seconds * 2;
 
diag_log format ["AIRRAID: Bombing Area: %1 %2",_xpos,_ypos];
//start bombing
_pos2 = [getPosATL _siren];
While {_seconds > 1} do {
_sound = createVehicle ["HeliHEmpty",position _target,[], _ray, "NONE"];
_sound say ["mortar1",1500];
_pos2 set [_seconds, getPosATL _sound];
sleep 2;
 
If (_choise == 1) then {
_espl = createVehicle ["SH_105_HE",position _sound,[], 0, "NONE"];
};
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;
};
 
sleep 60;
_repeat = _repeat - 1;
deletevehicle _espl;
deletevehicle _siren;
deletevehicle _loc;
deletevehicle _target;
diag_log format ["AIRRAID: Going down for sleep: Repeat:%1 | Sleep:%2",_repeat,_break];
sleep _break;                     
};
exit

This script is working, confirmed by me. Will continue testing the sounds for the next little while if I can, just to confirm again the sirens and bomb whistling drop sounds are playing for me.

There should be no confusion as to where is being bombed, basically it will tell you the location of every bomb that is dropped.
 
Here's my RPT for it
Code:
Line 2931: 15:31:48 "AIRRAID: Starting..."
    Line 2932: 15:31:50 "AIRRAID: Random Location: 2 | NEAF"
    Line 2933: 15:31:52 "AIRRAID: INCOMING ATTACK: Sounding Siren at: 12073.9 12724.3 | Repeat: 30| Type: 1 | Duration: 60"
    Line 2934: 15:31:52 "AIRRAID: POS: [12073.9,12724.3,1.5] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH"
    Line 2986: 15:32:53 "AIRRAID: SIREN: [12073.9,12724.3,1.5] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX"
    Line 2992: 15:36:58 "AIRRAID: Bombing Area: 12073.9 12724.3"
    Line 2993: 15:37:00 "AIRRAID: BOMB: [120,[12103.8,12810.1,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 2994: 15:37:02 "AIRRAID: BOMB: [120,[12056.2,12666.5,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 2995: 15:37:04 "AIRRAID: BOMB: [120,[12026.6,12719.8,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 2996: 15:37:06 "AIRRAID: BOMB: [120,[12117.5,12718.2,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 2997: 15:37:08 "AIRRAID: BOMB: [120,[12053.3,12721.5,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 2998: 15:37:10 "AIRRAID: BOMB: [120,[12021.5,12639.8,2.83882]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 2999: 15:37:12 "AIRRAID: BOMB: [120,[12042.8,12610,2.83888]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3000: 15:37:14 "AIRRAID: BOMB: [120,[12065.9,12810.7,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3001: 15:37:16 "AIRRAID: BOMB: [120,[12081.4,12632.7,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3002: 15:37:18 "AIRRAID: BOMB: [120,[12171.6,12774.7,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3003: 15:37:20 "AIRRAID: BOMB: [120,[12184.8,12683.5,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3004: 15:37:22 "AIRRAID: BOMB: [120,[12139.9,12819.2,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3005: 15:37:24 "AIRRAID: BOMB: [120,[12172.4,12668.3,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3006: 15:37:26 "AIRRAID: BOMB: [120,[12160.2,12669.7,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3007: 15:37:28 "AIRRAID: BOMB: [120,[12020.6,12732.6,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3008: 15:37:30 "AIRRAID: BOMB: [120,[11977.8,12730,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3009: 15:37:32 "AIRRAID: BOMB: [120,[12001,12818.4,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3010: 15:37:34 "AIRRAID: BOMB: [120,[11958,12719,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3011: 15:37:36 "AIRRAID: BOMB: [120,[12087.9,12785.8,2.95288]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3012: 15:37:38 "AIRRAID: BOMB: [120,[12056,12740.6,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3014: 15:37:40 "AIRRAID: BOMB: [120,[12020.3,12747.5,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3016: 15:37:42 "AIRRAID: BOMB: [120,[12062.4,12628.1,2.83888]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3017: 15:37:44 "AIRRAID: BOMB: [120,[12092.3,12770.2,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3018: 15:37:46 "AIRRAID: BOMB: [120,[11967.7,12705.5,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3019: 15:37:48 "AIRRAID: BOMB: [120,[12078.2,12730.8,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3020: 15:37:50 "AIRRAID: BOMB: [120,[12059.4,12757.4,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3021: 15:37:52 "AIRRAID: BOMB: [120,[12019.5,12802.8,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3022: 15:37:54 "AIRRAID: BOMB: [120,[12085.7,12779.8,2.95285]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3023: 15:37:56 "AIRRAID: BOMB: [120,[12103.9,12622.4,2.95285]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3024: 15:37:58 "AIRRAID: BOMB: [120,[12010.7,12823.9,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3025: 15:38:00 "AIRRAID: BOMB: [120,[12129.8,12712,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3026: 15:38:02 "AIRRAID: BOMB: [120,[12111.9,12655.8,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3027: 15:38:04 "AIRRAID: BOMB: [120,[12165.6,12725.4,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3028: 15:38:06 "AIRRAID: BOMB: [120,[12064.2,12758.8,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3029: 15:38:08 "AIRRAID: BOMB: [120,[12022.5,12812.9,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3030: 15:38:10 "AIRRAID: BOMB: [120,[12042.7,12792.1,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3031: 15:38:12 "AIRRAID: BOMB: [120,[12038.5,12793.6,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3032: 15:38:14 "AIRRAID: BOMB: [120,[12050,12613.6,2.83888]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3033: 15:38:16 "AIRRAID: BOMB: [120,[12110,12820.3,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3034: 15:38:18 "AIRRAID: BOMB: [120,[12080.5,12810.1,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3035: 15:38:20 "AIRRAID: BOMB: [120,[11997.8,12781,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3036: 15:38:22 "AIRRAID: BOMB: [120,[12070,12741.7,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3037: 15:38:24 "AIRRAID: BOMB: [120,[12058.3,12695.9,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3038: 15:38:26 "AIRRAID: BOMB: [120,[11968.3,12714.8,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3039: 15:38:28 "AIRRAID: BOMB: [120,[12121.3,12698,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3040: 15:38:30 "AIRRAID: BOMB: [120,[12100,12706,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3041: 15:38:32 "AIRRAID: BOMB: [120,[12104.9,12659.7,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3042: 15:38:34 "AIRRAID: BOMB: [120,[12052.5,12769.5,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3043: 15:38:36 "AIRRAID: BOMB: [120,[12124.3,12620.3,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3044: 15:38:38 "AIRRAID: BOMB: [120,[12065,12796.9,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3046: 15:38:40 "AIRRAID: BOMB: [120,[12098.4,12810.5,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3047: 15:38:42 "AIRRAID: BOMB: [120,[12192.1,12733.3,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3048: 15:38:44 "AIRRAID: BOMB: [120,[12057.9,12841.6,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3049: 15:38:46 "AIRRAID: BOMB: [120,[12046.9,12621.8,2.83888]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3050: 15:38:48 "AIRRAID: BOMB: [120,[12023,12728.2,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3051: 15:38:50 "AIRRAID: BOMB: [120,[12106,12630.7,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3052: 15:38:52 "AIRRAID: BOMB: [120,[12015.2,12664.8,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3053: 15:38:54 "AIRRAID: BOMB: [120,[12120.2,12614.3,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3054: 15:38:56 "AIRRAID: BOMB: [120,[12146.3,12731.7,2.95287]] | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX || COUNT 2 |"
    Line 3055: 15:38:56 "AIRRAID: BOMB: 120 | TARGET: [12073.9,12724.3,1.5] | SHOULD MATCH APPROX"
    Line 3057: 15:39:56 "AIRRAID: Going down for sleep: Repeat:29 | Sleep:120"

Big thanks to Sarge for being a great human being.
 
_break is seconds.
_repeat is the number of times to cycle completely - so the number of bombardments
(ie it selects Electro, bombs it, that is one bombardment)
 
Save this as mmmyum_bomb.sqf in the root of your pbo (dayz_chernarus1.pbo/mmmyum_bomb.sqf) Sry i know this is going to sound Dumb, but is that pbo the same as the mission. pbo from the Dayz st Control panel if not where might i find the Dayz_chenarus1.pbo. I added it to the one from the Control panel and checked logs but does not seem to be activating thank you for help in advance
 
Save this as mmmyum_bomb.sqf in the root of your pbo (dayz_chernarus1.pbo/mmmyum_bomb.sqf) Sry i know this is going to sound Dumb, but is that pbo the same as the mission. pbo from the Dayz st Control panel if not where might i find the Dayz_chenarus1.pbo. I added it to the one from the Control panel and checked logs but does not seem to be activating thank you for help in advance
Hi Bruce, its just your mission.pbo, that's just what mine is called. So yes, should be that one.
But did you call it anywhere? From init.sqf or from your mission.sqm?
 
OK SO BUGS

Seems there are a few bugs. Doing research.

Bombs are dropping in their correct locations, it seems, but -sirens/bomb whistling is tempermental -maye have to do with locality.
EDIT

So two bugs -

Sirens are tempermental - the usually play for me, but not always now. Not sure what's going on.

May be some problems with locality - as in the script is getting executed by each player on their login, not sure why this would happen but I'm learning and looking into this. Seems like it may choose a location near the player for first run?

This stuff has got to be problems with locality/how I'm calling the script, since I don't even refer to player postion anywhere I don't see why this would happen. Any ideas?

OK: More tested

I've got random bombs working well here, shit gets bombed at random. Haven't tested much more of the sirens, so if someone could confirm that they suck in the new code that would be great.

Currently, I'm looking into adding it to your dayz_server.pbo and calling it in the same way the helicrashes are called - just testing this now but it looks promising. I figure if it's not in the mission pbo nobody gets to call the script a second time - it'll execute just like the heli crashes. Which brings me to my next point
Got animated heli bombers working! AS IN THEY WILL FLY TO THE BOMB SITE AND NOT BE DELETED (thanks SARGE!)
Still testing these bad boys, before I release the updated animated AI air raid code. If they work properly, and the call from dayz_code.pbo works properly, we may be onto our next version!

Still gotta stamp out these bugs about the sirens, keep me posted on if they're working for you or not.
 
Yes I called it from my init.sqf thought i entered it exactly but have not seen it activateing in the logs
 
Yes I called it from my init.sqf thought i entered it exactly but have not seen it activateing in the logs
You're sure you followed the directions right? That's odd.
Maybe it's not the right mission.pbo, should be under mpmissions. Are you editing the singleplayer one?
 
Script Restriction CreateVehicle #11
I have it set to 1 but ppl are still getting kicked. any ideas?

Are there any alternatives to BE for a dayz.st server?
 
It's kinda obvious really. It's the fact that you are creating vehicles with the script. You need to go through your scripts.txt and on the create vehicle lines, add !"mmmyum_bomb.sqf" to create an exception for the script.

@AxeCain
This is as far as I know. Not sure about BE since I don't use it (passworded). Changing the 5 to a 1 didn't work? From what I understand, that completely disables that rule - are you sure you got the right one?
Good luck, sorry I don't know more about BE
 
I changed all of mine to either 1 or 2. Still get kicked.
Looking into using anti hack. Is it possible to use a Rcon program like Dart w/o BE?

Code:
//new //#+2 ;PoC
1 addAction !"\"addAction\"," !"_action1 = _unit addAction [localize \"str_actions_medical_01" !"s_player_grabflare = player addAction [format[localize \"str_actions_medical_15\",_te" !"raddAction = 'addAction'" !"raddActioncode = compile PreprocessFile (BIS_PathMPscriptCommands + 'addAction.sqf')" !"null = _holder addAction [format[(localize \"STR_DAYZ_CODE_1\"),_name], \"\z\addons\dayz_code\actions\object_pickup.sqf\"," !"NORRN_dropAction = player addAction [\"Drop body\", \"\z\addons\dayz_code\medical\drop_body.sqf\",_dragee, 0, false, true];" !"s_player_dropflare = player addAction [format[localize \"str_actions_medical_16\",_text],"
1 addEventHandler !"\"addEventHandler" !"displayAddEventHandler" !"ctrlAddEventHandler" !"raddEventhandler = 'addEventhandler'" !"raddEventhandlercode = compile PreprocessFile (BIS_PathMPscriptCommands + 'addEventhandler.sqf')" !"id = _unit addeventhandler [\"HandleDamage\",{_this call local_zombieDamage}];" !"id = _unit addeventhandler [\"Killed\",{[_this,\"zombieKills\"] call local_eventKill}];" !"eh1 = _unit addeventhandler [\"HandleDamage\",{if (local (_this select 0)) then {_this call fnc_usec_damageVehicle}}];" !"eh2 = _unit addeventhandler [\"Killed\",{if (local (_this select 0)) then {_this call object_vehicleKilled}}];" !"eh3 = _unit addEventHandler [\"GetOut\", {[(_this select 0),"position"] call server_updateObject;}];" !"eh1 = _unit addeventhandler [\"HandleDamage\",{_this call fnc_usec_damageHandler;0} ];" !"eh2 = _unit addEventHandler [\"Fired\", {_this call player_fired;}];" !"eh3 = _unit addEventHandler [\"Killed\", {_id = [] spawn player_death;}];" !"_id = player addEventHandler [\"Respawn\", {_id = [] spawn player_death;}];" !"dayz_originalPlayer = _oldUnit;\n_oldUnit addEventHandler [\"HandleDamage\",{false}];\n_oldUnit disableAI \"ANIM\";" !"_timeN = time;\n\n_id = _agent addeventhandler [\"HandleDamage\",{_this call local_zombieDamage}];" !"eh_player_killed = player addeventhandler [\"FiredNear\",{_this call player_weaponFiredNear;} ];"
1 displayAddEventHandler !"\"displayAddEventHandler\"," !"(findDisplay 46) displayAddEventHandler [\"KeyDown\",\"_this call dayz_spaceInterrupt\"];\nplayer disableConversation"
2 addGroupIcon !"\"addGroupIcon\"," !"dayzesp.sqf","
1 addPublicVariableEventHandler !"\"addPublicVariableEventHandler\"," !"healp.sqf"," !"DynamicWeather_DebugTextEventArgs\" addPublicVariableEventHandler {" !"\"remExField" addPublicVariableEventHandler {_this call BIS_MPF_remoteExecution" !"\"dayzSetFuel\" addPublicVariableEventHandler {(_this select" !"\"drn_DynamicWeather_DebugTextEventArgs\" addPublicVariableEventHandler {" !"\"dayzSetFuel\" addPublicVariableEventHandler {(_this select"
1 addRating !"\"addRating\","
1 addResources !"\"addResources\","
1 addSwitchableUnit !"\"addSwitchableUnit\"," !"addSwitchableUnit _newUnit;" !"addSwitchableUnit dayz_originalPlayer;"
2 addWaypoint !"\"addWaypoint\","
1 allowDamage !"\"allowDamage\"," !"Godmode.sqf"," !"player allowDamage true;" !"_object allowDamage false;"
1 allowDammage !"\"allowDammage\"," !"Godmode.sqf"," !"this enableSimulation false;this allowDammage false;this disableAI 'FSM';this disableAI 'ANIM';this"
1 attachTo !"\"attachTo\"," !"_point attachTo [_unit,_modelPos,_wound];" !"_fl attachto [_v,[0,0,0],\"destructionEffect2\"];" !"_dragee attachto [_unit,[0.1, 1.01, 0]];" !"_bolt attachTo [_hitObject,_val,_hitMemoryPt];" !"_flare attachTo [player,[0,0,0],\"granat2\"];" !"_smoke attachto [_vehicle,[0,0,0],\"destructionEffect1\"];" !"_smoke attachto [_v,[0,0,0],\"destructionEffect1\"];"
1 createDialog !"\"createDialog\"," !"createDialog \"RscDisplayGenderSelect\";"
1 createMarker !"\"createMarker\"," !"createMarkerLocal" !"if (isnil 'BIS_GITA_fnc_createMarkers' || false) then {"
1 createMarkerLocal !"\"createMarkerLocal\"," !"rcreateMarkerLocal = 'createMarkerLocal'" !"rcreateMarkerLocalcode = compile PreprocessFile (BIS_PathMPscriptCommands + 'createMarkerLocal.sqf')"
1 createMenu !"\"createMenu\"," !"if (isnil 'BIS_fnc_createmenu' || false) then {"
1 createSimpleTask !"\"createSimpleTask\"," !"rcreateSimpleTask = 'createSimpleTask'" !"rcreateSimpleTaskcode = compile PreprocessFile (BIS_PathMPscriptCommands + 'createSimpleTask.sqf')"
1 createUnit !"\"createUnit\"," !"BIS_MPF_logic = BIS_MPF_dummygroup createUnit [" !"_newUnit = _group createUnit [_class,dayz_spawnPos,[],0,\"NONE\"]"
5 createMine !"\"createMine\","
5 createTarget !"\"createTarget\","
1 createVehicle !"\"createVehicle\"," !"fixes\change_streetlights.sqf"," !"#lightpoint" createVehicle _location;"," !"createVehicleLocal" !"createVehicle [\"WeaponHolder\", _iPos, [], _radius, \"CAN_COLLIDE\"" !"_fire = createVehicle [_classname, _location, [], 0, \"CAN_COLLIDE\"" !"_object = createVehicle [_classname, _location, [], 0, \"CAN_COLLIDE\"" !"if (_height < 100) then {\n_bolt = createVehicle [\"BoltSteelF\", _endPos, [], 0, \"CAN_COLLIDE\"];\n_bolt setPosATL _endPos;" !"_tent = createVehicle [\"TentStorage\", _location, [], 0, \"CAN_COLLIDE\"];\n_tent setdir _dir;" !"if ((random _int)>2.2) then\n{\n_b=\"SmallSecondary\" createvehicle (getpos _v);\n};" !"exitwith {};\n_b=\"SmallSecondary\" createvehicle (_v modelToWorld _effect2pos);\n} foreach (_list);" !"_bag = createVehicle [format[\"WeaponHolder_%1\",_item],getPosATL player,[], 0, \"CAN_COLLIDE\"];\n_bag setdir (getDir player);" !"_bag = createVehicle [\"WeaponHolder_ItemTent\",_pos,[], 0, \"CAN_COLLIDE\"];\n_bag setdir _dir;\nplayer reveal _bag;" !"_object = _type createVehicleLocal _position;\n_object setPos _position;\n_object setDir _dir;\n_object allowDamage false;"
1 createVehicleLocal !"\"createVehicleLocal\"," !"_point = \"Logic\" createVehicleLocal getPosATL _unit;" !"_object = _type createVehicleLocal _position;" !"_fl = \"#particlesource\" createVehicleLocal getpos _v;" !"_lightArea = \"#lightpoint\" createVehicleLocal (getPosATL _flare);" !"_lightSpark = \"#lightpoint\" createVehicleLocal (getPosATL _flare);" !"_source = \"#particlesource\" createVehicleLocal getpos (_this select 0);" !"_source = \"#particlesource\" createVehicleLocal _pos;\n_source setParticleParams" !"_smoke = \"#particlesource\" createVehicleLocal _pos;\n_smoke attachto [_v,[0,0,0],\"destructionEffect1\"];" !"_Crater= \"CraterLong\" createvehiclelocal [_pos select 0, _pos select 1, 0];\n_Crater setdir (_dir + (180 * _i));"
1 disableUserInput !"\"disableUserInput\"," !"disableUserInput false;"
 
I changed all of mine to either 1 or 2. Still get kicked.
Looking into using anti hack. Is it possible to use a Rcon program like Dart w/o BE?

Code:
//new //#+2 ;PoC
1 addAction !"\"addAction\"," !"_action1 = _unit addAction [localize \"str_actions_medical_01" !"s_player_grabflare = player addAction [format[localize \"str_actions_medical_15\",_te" !"raddAction = 'addAction'" !"raddActioncode = compile PreprocessFile (BIS_PathMPscriptCommands + 'addAction.sqf')" !"null = _holder addAction [format[(localize \"STR_DAYZ_CODE_1\"),_name], \"\z\addons\dayz_code\actions\object_pickup.sqf\"," !"NORRN_dropAction = player addAction [\"Drop body\", \"\z\addons\dayz_code\medical\drop_body.sqf\",_dragee, 0, false, true];" !"s_player_dropflare = player addAction [format[localize \"str_actions_medical_16\",_text],"
1 addEventHandler !"\"addEventHandler" !"displayAddEventHandler" !"ctrlAddEventHandler" !"raddEventhandler = 'addEventhandler'" !"raddEventhandlercode = compile PreprocessFile (BIS_PathMPscriptCommands + 'addEventhandler.sqf')" !"id = _unit addeventhandler [\"HandleDamage\",{_this call local_zombieDamage}];" !"id = _unit addeventhandler [\"Killed\",{[_this,\"zombieKills\"] call local_eventKill}];" !"eh1 = _unit addeventhandler [\"HandleDamage\",{if (local (_this select 0)) then {_this call fnc_usec_damageVehicle}}];" !"eh2 = _unit addeventhandler [\"Killed\",{if (local (_this select 0)) then {_this call object_vehicleKilled}}];" !"eh3 = _unit addEventHandler [\"GetOut\", {[(_this select 0),"position"] call server_updateObject;}];" !"eh1 = _unit addeventhandler [\"HandleDamage\",{_this call fnc_usec_damageHandler;0} ];" !"eh2 = _unit addEventHandler [\"Fired\", {_this call player_fired;}];" !"eh3 = _unit addEventHandler [\"Killed\", {_id = [] spawn player_death;}];" !"_id = player addEventHandler [\"Respawn\", {_id = [] spawn player_death;}];" !"dayz_originalPlayer = _oldUnit;\n_oldUnit addEventHandler [\"HandleDamage\",{false}];\n_oldUnit disableAI \"ANIM\";" !"_timeN = time;\n\n_id = _agent addeventhandler [\"HandleDamage\",{_this call local_zombieDamage}];" !"eh_player_killed = player addeventhandler [\"FiredNear\",{_this call player_weaponFiredNear;} ];"
1 displayAddEventHandler !"\"displayAddEventHandler\"," !"(findDisplay 46) displayAddEventHandler [\"KeyDown\",\"_this call dayz_spaceInterrupt\"];\nplayer disableConversation"
2 addGroupIcon !"\"addGroupIcon\"," !"dayzesp.sqf","
1 addPublicVariableEventHandler !"\"addPublicVariableEventHandler\"," !"healp.sqf"," !"DynamicWeather_DebugTextEventArgs\" addPublicVariableEventHandler {" !"\"remExField" addPublicVariableEventHandler {_this call BIS_MPF_remoteExecution" !"\"dayzSetFuel\" addPublicVariableEventHandler {(_this select" !"\"drn_DynamicWeather_DebugTextEventArgs\" addPublicVariableEventHandler {" !"\"dayzSetFuel\" addPublicVariableEventHandler {(_this select"
1 addRating !"\"addRating\","
1 addResources !"\"addResources\","
1 addSwitchableUnit !"\"addSwitchableUnit\"," !"addSwitchableUnit _newUnit;" !"addSwitchableUnit dayz_originalPlayer;"
2 addWaypoint !"\"addWaypoint\","
1 allowDamage !"\"allowDamage\"," !"Godmode.sqf"," !"player allowDamage true;" !"_object allowDamage false;"
1 allowDammage !"\"allowDammage\"," !"Godmode.sqf"," !"this enableSimulation false;this allowDammage false;this disableAI 'FSM';this disableAI 'ANIM';this"
1 attachTo !"\"attachTo\"," !"_point attachTo [_unit,_modelPos,_wound];" !"_fl attachto [_v,[0,0,0],\"destructionEffect2\"];" !"_dragee attachto [_unit,[0.1, 1.01, 0]];" !"_bolt attachTo [_hitObject,_val,_hitMemoryPt];" !"_flare attachTo [player,[0,0,0],\"granat2\"];" !"_smoke attachto [_vehicle,[0,0,0],\"destructionEffect1\"];" !"_smoke attachto [_v,[0,0,0],\"destructionEffect1\"];"
1 createDialog !"\"createDialog\"," !"createDialog \"RscDisplayGenderSelect\";"
1 createMarker !"\"createMarker\"," !"createMarkerLocal" !"if (isnil 'BIS_GITA_fnc_createMarkers' || false) then {"
1 createMarkerLocal !"\"createMarkerLocal\"," !"rcreateMarkerLocal = 'createMarkerLocal'" !"rcreateMarkerLocalcode = compile PreprocessFile (BIS_PathMPscriptCommands + 'createMarkerLocal.sqf')"
1 createMenu !"\"createMenu\"," !"if (isnil 'BIS_fnc_createmenu' || false) then {"
1 createSimpleTask !"\"createSimpleTask\"," !"rcreateSimpleTask = 'createSimpleTask'" !"rcreateSimpleTaskcode = compile PreprocessFile (BIS_PathMPscriptCommands + 'createSimpleTask.sqf')"
1 createUnit !"\"createUnit\"," !"BIS_MPF_logic = BIS_MPF_dummygroup createUnit [" !"_newUnit = _group createUnit [_class,dayz_spawnPos,[],0,\"NONE\"]"
5 createMine !"\"createMine\","
5 createTarget !"\"createTarget\","
1 createVehicle !"\"createVehicle\"," !"fixes\change_streetlights.sqf"," !"#lightpoint" createVehicle _location;"," !"createVehicleLocal" !"createVehicle [\"WeaponHolder\", _iPos, [], _radius, \"CAN_COLLIDE\"" !"_fire = createVehicle [_classname, _location, [], 0, \"CAN_COLLIDE\"" !"_object = createVehicle [_classname, _location, [], 0, \"CAN_COLLIDE\"" !"if (_height < 100) then {\n_bolt = createVehicle [\"BoltSteelF\", _endPos, [], 0, \"CAN_COLLIDE\"];\n_bolt setPosATL _endPos;" !"_tent = createVehicle [\"TentStorage\", _location, [], 0, \"CAN_COLLIDE\"];\n_tent setdir _dir;" !"if ((random _int)>2.2) then\n{\n_b=\"SmallSecondary\" createvehicle (getpos _v);\n};" !"exitwith {};\n_b=\"SmallSecondary\" createvehicle (_v modelToWorld _effect2pos);\n} foreach (_list);" !"_bag = createVehicle [format[\"WeaponHolder_%1\",_item],getPosATL player,[], 0, \"CAN_COLLIDE\"];\n_bag setdir (getDir player);" !"_bag = createVehicle [\"WeaponHolder_ItemTent\",_pos,[], 0, \"CAN_COLLIDE\"];\n_bag setdir _dir;\nplayer reveal _bag;" !"_object = _type createVehicleLocal _position;\n_object setPos _position;\n_object setDir _dir;\n_object allowDamage false;"
1 createVehicleLocal !"\"createVehicleLocal\"," !"_point = \"Logic\" createVehicleLocal getPosATL _unit;" !"_object = _type createVehicleLocal _position;" !"_fl = \"#particlesource\" createVehicleLocal getpos _v;" !"_lightArea = \"#lightpoint\" createVehicleLocal (getPosATL _flare);" !"_lightSpark = \"#lightpoint\" createVehicleLocal (getPosATL _flare);" !"_source = \"#particlesource\" createVehicleLocal getpos (_this select 0);" !"_source = \"#particlesource\" createVehicleLocal _pos;\n_source setParticleParams" !"_smoke = \"#particlesource\" createVehicleLocal _pos;\n_smoke attachto [_v,[0,0,0],\"destructionEffect1\"];" !"_Crater= \"CraterLong\" createvehiclelocal [_pos select 0, _pos select 1, 0];\n_Crater setdir (_dir + (180 * _i));"
1 disableUserInput !"\"disableUserInput\"," !"disableUserInput false;"
Well shoot man, I don't know :(
Tried adding !"mmmyum_bomb.sqf" in the createVehicle rule? (by !"fixes/change_streethlights.sqf" for example)
If they're all disabled, then how could you possibly be being kicked? Stupid BE?
 
UPDATE: 930pm EST 25/04/13

I've got a working animated AI heli air raid script! It is creating a heli, who flies over a city, bombs it, goes down and spawns AIs, then flies away. I'm not sure if it's playing sirens, as I have not seen it in game enough yet. Will report back!

CALL FROM DAYZ_SERVER.PBO is WORKING!

Now, this may fix our issues with sirens. Try adding it yourself if you feel adventurous, with the current script it should work fine too!

1)>>Add to compile folder the script you want to use - I named my new one server_airRaid.sqf

2)>>Open server_monitor.sqf and add this line to it below the crash site code
// mmmmyum airraid
nul = [] spawn server_airRaid; ///change to name of your script

3)>>Open server_functions.sqf and add this below spawn_carePackages...
///////////////////////////mmmyum custom
server_airRaid = compile preprocessFileLineNumbers "z\addons\dayz_server\compile\server_airRaid.sqf";


Report back here to let us know if this is fixing your siren issues.
 
STATUS:
Working Animated Heli AirRaid with AI spawn - 0.41 http://pastebin.com/yD4zj297
Bugs: siren sounds, experimenting with new siren sound play commands, use at your own risk!
NEED TESTERS! install it and report back - call via dayz_server.pbo

So there looks like a problem with the say command maybe, I have not been able to test with more than one player to confirm, but it may cause multiple sounds to play for each player connected, or only leave one for the first player who connects.

I've been looking at two other ways to call it
Code:
_playNum = 50
while (_playNum > 0) do {
    if (isPlayer _x AND (_x distance _siren) < 1500) then {
_nul = [nil, _siren, rSAY, ["nam", 1500]] call RE; // This is a RPC sound call for the sound
} foreach playableUnits;
sleep 10;
10 fadeSound 1; // Fades sound in over time
};

this uses the rSAY to play the sound, with call RE to execute on remote clients. Not throwing any errors, but I have yet to be in position to test it.

also using this
Code:
_sirenSound = createSoundSource ["HeliHEmpty", position _target, [], 5];
But I'm not quite sure how it works, or if it will work for my purpose. Don't know where to tell it what sound to play.

1:16:05 Warning Message: No entry 'bin\config.bin/CfgVehicles/HeliHEmpty.sound'.
1:16:05 Warning Message: '/' is not a value
1:16:05 Warning Message: SFX not found

Getting these from the createSoundSource - so it's clearly not working. Trying to find the sound in HeliHEmpty.sound. Can I call "puk" or another of my custom sounds from CfgSounds?


Anyone an arma sound expert?

I'm a sound designer, anyone got good suggestions for more sound effects? Going to enable the radio eventually, make some AI radio calls about the bombings.
 
Updated Random Code using different calls for sounds - try this, calling it any way you like! Report back!
No Animated Heli bombing, just regular good old random bombings! No AI, no requirements, install as in first post, or in day_server.pbo.

Please give this a try guys, it may fix the way sounds are called, making them consistent for everyone.

You should hear sirens if you are within 1500 m of the location to be bombed. Whistling from droppings bombs I will put in if this works, and release a new version to the OP.

EDIT THIS IS OLD ----- SEE REVISED CODE
------------->from post http://opendayz.net/threads/air-raid-bombing-and-siren.9464/page-7#post-38723
OLD CODE FOLLOWS:
Code:
////////////////////////////////////////////////////////////////////////////////////////
//      DayZ Air Raid written by                                                    //
//              mmmyum    with    work    from                                      //
// sirens: http://www.armaholic.com/page.php?id=12598 by DarkXess                    //
// bombs: http://www.armaholic.com/page.php?id=15612 by Maxjoiner                    //
////////////////////////////////////////////////////////////////////////////////////////
 
/////////////////////////SETUP repeat and break
 
private ["_espl","_sound","_pos2","_pos2cnt","_seconds","_rndLoc","_place","_position","_choice","_duration","_xpos","_ypos","_targetpos","_loc","_posloc","_target","_pos","_siren","_pos1","_choise","_ray","_dblsecs","_repeat","_break"];
sleep 10;
_repeat = 30;                            //times to repeat
_break = 120;                            //time to break between attacks
_position = [13135.9, 10393.3, 1.5]; //leave this
_xpos = 13135.9;
_ypos = 10393.3;
//repeat script
diag_log format ["AIRRAID: Starting..."];
sleep 2;
While {_repeat > 1} do {
/////////////////////////SETUP position
//                                      enter positions below. format x,y,z
    _rndLoc=floor(random 6);
    _place=
    switch (_rndLoc) do
    {
      case 0: {"Electro"};
      case 1: {"Berezino"};
      case 2: {"NEAF"};
      case 3: {"Stary"};
      case 4: {"Vybor"};
      case 5: {"Gorka"};
    };
    diag_log format ["AIRRAID: Random Location: %1 | %2",_rndLoc,_place];
    _position=
    switch (_rndLoc) do
    {
      case 0: {[10480.6, 2217.8, 1.5]};
      case 1: {[12043.9, 9091.3, 1.5]};
      case 2: {[12073.9, 12724.3, 1.5]};
      case 3: {[6143.6, 7721.5, 1.5]};
      case 4: {[3815.1, 8865.0, 1.5]};
      case 5: {[9659.0, 8795.3, 1.5]};
    };
//////////////////////////SETUP type of bombing and duration
_choice = 1;
_duration = 60;
/////////////////////////
_xpos = _position select 0;
_ypos = _position select 1;
_targetpos = [_xpos, _ypos, 1.5];
_loc = createVehicle ["HeliHEmpty", _targetpos,[], 0, "NONE"];
_posloc = position _loc;
diag_log format ["AIRRAID: POS LOC: %1 | TARGET: %2 | SHOULD MATCH",_posloc,_targetpos];
_target = createVehicle ["HeliHEmpty",position _loc,[], 0, "NONE"];  // target bombing
sleep 2;
diag_log format ["AIRRAID: INCOMING ATTACK: Sounding Siren at: %1 %2 | Repeat: %3| Type: %4 | Duration: %5",_xpos,_ypos,_repeat,_choice,_duration];
//sounds
_pos = position _target;
diag_log format ["AIRRAID: POS: %1 | TARGET: %2 | SHOULD MATCH || Siren new sound call",_pos,_targetpos];
_siren = createVehicle ["HeliHEmpty",position _target,[], 0, "NONE"];
 
//_siren say ["eve",1500];                                                        // siren sound
[nil,_siren,rSAY,['puk', 1500]] call RE;
sleep 60;
[nil,_siren,rSAY,['nam', 1500]] call RE;
_pos1 = position _siren;
diag_log format ["AIRRAID: SIREN: %1 | TARGET: %2 | SHOULD MATCH APPROX|| Siren old sound call",_pos1,_targetpos];
//_siren say ["eve",1500];                                                        // siren sound
sleep 60;
_siren say ["eve",1500];                                                        // siren sound
sleep 60;
_siren say ["eve",1500];                                                        // siren sound
sleep 60;
//_siren say ["puk",1500];
diag_log format ["AIRRAID: SIREN: %1 | TARGET: %2 | SHOULD MATCH APPROX ||| Siren back to NEW SOUND CALL",_pos1,_targetpos];
[nil,_siren,rSAY,['nam', 1500]] call RE;
sleep 60;                                                                      // wait a while
[nil,_siren,rSAY,['eve', 1500]] call RE;
//_siren say ["nam",1500];
sleep 5;                                                                      //thats enough warning
 
//start bombing init
_choise = _choice;    // choise bombing: 1 = light 2 = medium 3 = heavy
_ray = 120;          // ray of bombing
_seconds = _duration; // time bombing
_dblsecs = _seconds * 2;
 
diag_log format ["AIRRAID: Bombing Area: %1 %2",_xpos,_ypos];
//start bombing
_pos2 = [getPosATL _siren];
While {_seconds > 1} do {
_sound = createVehicle ["HeliHEmpty",position _target,[], _ray, "NONE"];
_sound say ["mortar1",1500];
_pos2 set [_seconds, getPosATL _sound];
sleep 2;
 
If (_choise == 1) then {
_espl = createVehicle ["SH_105_HE",position _sound,[], 0, "NONE"];
};
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;
};
 
sleep 60;
_repeat = _repeat - 1;
deletevehicle _espl;
deletevehicle _siren;
deletevehicle _loc;
deletevehicle _target;
diag_log format ["AIRRAID: Going down for sleep: Repeat:%1 | Sleep:%2",_repeat,_break];
sleep _break;               
};
exit
 
UPDATE 26 APRIL 2013 !! 1230pmEST
__________________________________________________________________
ANIMATED AI HELI BOMBER AIRRAID 0.42a
||| WORKING! ||| WORKING SIRENS!
__________________________________________________________________

Hey guys, I know I've been plastering you with updates, but this is the one.
The big one


DOWNLOAD SCRIPT
>>>>> http://pastebin.com/8qdsxRJh <<<<<

Copy this pastebin code, and add it as I described. (Tested calling through dayz_server.pbo - put in compiles, add to server_monitor.sqf & server_functions)

EDIT: working on next version. Random worldspaces reinstated, rmodyn working (picks between types of choppers), fixed hover over aispawn for a few seconds, better siren sound progression. next up - cycle between waypoints to move across city as bombing, make it killable, make it spawn heli crash if shot down........It's almost ready now....

Dependent on add_unit_server.sqf (ai code) and must have animated heli crashes installed (needs the Sarge variable to be added to avoid chopper AI bomber being killed by "killed a hacker")

Video
0:10 for chopper fly in 5:30 for bombs start


So what does it do?

-creates heli and pilot & sends them to selected city
-when within approx 2000m sirens begin to play at city
-chopper arrives, hangs out a bit, them bombs begin
-whistling noise as bombs fall
-when bombardment complete, lowers chopper, spawns AI group in landingzone (optional), flies away.

For your testing convenience - this script will only bomb electro, near the hospital.

Now a couple things -
>>>The 'say' command was sucking dicks on MP. We've moved on to rSAY call RE, which should execute on each client remotely.
>>>I've added two called, one with foreach playableUnit and one without - this is to test if all connected clients can hear it, or if we need the foreach. > Half the sirens will sound with foreach, half will not. > If anyone can't hear the mortar whistling noises, it could be because they have no foreach.
>>>I have not been able to test it in a MP environment yet - only myself logged on the server so far. It should work just fine, especially if you have called it from the dayz_server.pbo.
>>>Please let me know if it works from the init or mission.sqm if you have it installed that way, I have not got to testing those methods yet.
>>>Random script just needs the locations changed again. I made it static to test.


Quote post 138 - explain how to add via dayz_server.pbo
UPDATE: 930pm EST 25/04/13

I've got a working animated AI heli air raid script! It is creating a heli, who flies over a city, bombs it, goes down and spawns AIs, then flies away. I'm not sure if it's playing sirens, as I have not seen it in game enough yet. Will report back!

CALL FROM DAYZ_SERVER.PBO is WORKING!

Now, this may fix our issues with sirens. Try adding it yourself if you feel adventurous, with the current script it should work fine too!

1)>>Add to compile folder the script you want to use - I named my new one server_airRaid.sqf

2)>>Open server_monitor.sqf and add this line to it below the crash site code
// mmmmyum airraid
nul = [] spawn server_airRaid; ///change to name of your script

3)>>Open server_functions.sqf and add this below spawn_carePackages...
///////////////////////////mmmyum custom
server_airRaid = compile preprocessFileLineNumbers "z\addons\dayz_server\compile\server_airRaid.sqf";


Report back here to let us know if this is fixing your siren issues.

TODO:
> bombs start to drop from chopper pos as it hits city borders
> chopper hovers at ground level for ~10 s while troops hop out
> reinstate random city selection (when confirmed sound working)
> nuke options (this is still a ways off)
> random siren sound selection per rotation (option)
> redistribute siren sounds to make a nicer pattern (ie calmest plays first, then more stressful as chopper approaches, super stressful when bombs are about to start)
> make chopper killable to stop event (add exception where loop exits if chopper is destroyed)
> error handling if chopper is accidentally killed
> 3 waypoints surrounding city so chopper flies around while bombing
> enable rmodyn to select different heli models (selectable if you have rmod or not to include more helis)
> clean up excess debug diag_logs
> clean up extra variables and make efficient
> clean up formatting, comment up, so it's all clear to everyone
 
Back
Top