Air raid - bombing and siren

Sorry guys on my phone - leaving for coachella!!- but I will try to respond.

Yes that floor random 6 code looks right. Your RPT should have airraid if it is working correctly.
Right now it should bomb the target area but all around it - because it is picking new safe positions on the ground - so it shouldn't hit the same place twice. But will hit in a circular pattern all around it.
To change it to two locations, just change the number of cases to what you want, then change the random 49 to a count of what you'd like to select.
Check my other world space post sarge had some good advice that will be integrate
- I will be updating the script when I get back from coachella, so it will be a few days!

Cheers will test tonight when server is dead!
Thanks.
 
Hey guys, been testing this for past day or so, late nights lol, i have no idea whats going on. the explosions work fine, but still sound will not play, which i seriously dont understand because they are custom sounds, i though it was missing brackets etc i have gone over it quite a few times, maybe some fresh eyes can help me out, heres a snippet of how it looks in my descriptions.ext as well a snip from the RPT showing the execution of the script seemingly running fine.

I tried the AI Heli bombing script, i had trouble getting it to work, i think it could be a conflict between my AI package i dunno i got errors in expression on line 58 when i ran it, just wanting to try and get the sound working i reverted back to the random loc script.

descriptions.ext snip
Code:
class CfgSounds
{
    sounds[]={nam,eve,puk};
    class nam
    {
        name = "Siren1";
        sound[] = {sound\SirenLoopMono.ogg, db-12, 1.0};
        titles[] = {""};
    };
    class eve
    {
        name = "Siren2";
        sound[] = {sound\Sirens.ogg, db-12, 1.0};
        titles[] = {""};
    };
    class puk
    {
        name = "Siren3";
        sound[] = {sound\Sirens2.ogg, db-12, 1.0};
        titles[] = {""};
    };
};

RPT
Code:
"DEBUG FPS  : 24.4648"
18:44:23 "READ/WRITE: "["PASS",[2013,4,18,8,44]]""
18:44:42 "AIRRAID: Bombing Area: 792.73 9434.32"
18:45:25 "DEBUG FPS  : 28.5714"
18:46:25 class HitPoints::Hitglass not found in Land_Mil_House_dam
18:46:25 Error: Hitpoint Hitglass not found in the model ca\structures\mil\mil_house_dam.p3d (original model ca\structures\mil\mil_house.p3d)
18:47:42 "AIRRAID: Going down for sleep: Repeat:29 | Sleep:120"
18:48:26 "DEBUG FPS  : 26.534"
18:49:23 "READ/WRITE: "["PASS",[2013,4,18,8,49]]""
18:49:42 "AIRRAID: Random Location: 5 | NWAF"
18:49:44 "AIRRAID: INCOMING ATTACK: Sounding Siren at: 792.73 9434.32 | Repeat: 29| Type: 1 | Duration: 60"
18:49:44 "AIRRAID: POS: [789.375,9435.63,1.5] | TARGET: [792.73,9434.32,1.5] | SHOULD MATCH"

line 58 on the Heli bomb script
Code:
//Random Heli-Type
    if (_rmodyn = 1) then {
        _heliModel =
 
I gave it a go. It Didnt work.
This is what i got in my RPT

Code:
 3:42:07 "AIRRAID: BOMBER:  | Lift Off at [1623.71,218.188,300] | with Backup WP [7492.67,15263]"
3:42:07 "AIRRAID: BOMBER:  started flying from [1623.71,218.188,300] to [6731.01,2573.03] NOW!(TIME:4||LT:)"
3:42:08 "RANDOM WORLDSPACE: Cherno | [6743.89,2581.19,1.5]"
3:42:09 "RANDOM WORLDSPACE SELECTED: 2 | City: Cherno | Coords: 6743.89  2581.19 |||Try 9"
3:42:11 "AIRRAID: BOMBER:  | Lift Off at [1623.71,218.188,300] | with Backup WP [7492.67,15263]"
3:42:11 "AIRRAID: BOMBER:  started flying from [1623.71,218.188,300] to [7100,7750,300] NOW!(TIME:8||LT:)"
3:42:12 Error in expression <,6743.8853,2581.1865]};
};
_city = _loc select 0;
_z = _loc select 1;
_x = _loc >
3:42:12  Error position: <select 0;
_z = _loc select 1;
_x = _loc >
3:42:12  Error select: Type Bool, expected Array,Config entry
3:42:12 File mpmissions\__cur_mp.chernarus\mmmyum_bomb.sqf, line 41
 
The air raid is working for me now, but the sirens aren't working.

Correction... The sirens ARE playing. But they are playing at the wrong location!

Also, its bombing 2 locations at once!

15:57:14 "AIRRAID: Random Location: 1 | Berezino"
15:57:16 "AIRRAID: INCOMING ATTACK: Sounding Siren at: 12043.9 9091.3 | Repeat: 29| Type: 1 | Duration: 60"
15:57:16 "AIRRAID: POS: [12043.9,9091.3,1.5] | TARGET: [12043.9,9091.3,1.5] | SHOULD MATCH"
15:59:00 "DEBUG FPS : 50" 16:02:01 "DEBUG FPS : 50.1567" 16:02:21 "AIRRAID: Bombing Area: 12043.9 9091.3"


For this particular incident the sirens are playing at GORKA; the bombs dropped at both Berezino and Gorka (but no sirens played at Berezino).



I have let the server continue running and the same holds true, the sirens will play at one location, but bomb 2 locations at once.
 
The air raid is working for me now, but the sirens aren't working.

Correction... The sirens ARE playing. But they are playing at the wrong location!

Also, its bombing 2 locations at once!

15:57:14 "AIRRAID: Random Location: 1 | Berezino"
15:57:16 "AIRRAID: INCOMING ATTACK: Sounding Siren at: 12043.9 9091.3 | Repeat: 29| Type: 1 | Duration: 60"
15:57:16 "AIRRAID: POS: [12043.9,9091.3,1.5] | TARGET: [12043.9,9091.3,1.5] | SHOULD MATCH"
15:59:00 "DEBUG FPS : 50" 16:02:01 "DEBUG FPS : 50.1567" 16:02:21 "AIRRAID: Bombing Area: 12043.9 9091.3"


For this particular incident the sirens are playing at GORKA; the bombs dropped at both Berezino and Gorka (but no sirens played at Berezino).



I have let the server continue running and the same holds true, the sirens will play at one location, but bomb 2 locations at once.

Was this the random location script in the first post?
This may be true for me as well because one guy did say he heard them that wasn't in the place that was getting bombed.
 
well i am still goin at it, on and off trying to get these Sirens to work, still for some reason they wont play, but say they are playing in RPT and no errors, i have even commented out the Killing a Hacker, thinking it was destroying the vehicle with the sounds before it could load as mmyum mentioned, still nothing though, no mortar sound, no sirens, only explosions :(
 
well i am still goin at it, on and off trying to get these Sirens to work, still for some reason they wont play, but say they are playing in RPT and no errors, i have even commented out the Killing a Hacker, thinking it was destroying the vehicle with the sounds before it could load as mmyum mentioned, still nothing though, no mortar sound, no sirens, only explosions :(

Hi Sabbath,

I am running Panthera 1.8 & am now in the process of testing this with the custom sounds. I'll let you know :)
 
Hey Stig, that would be great lol, i removed the killing a hacker lines as i mentuioned, im not using the Heli bomb script, i reverted back to the random loc script jsut to see about these sounds, im getting some new errors in the RPT now, not sure if any of you guys have seen this one any help would be awesome, lol

Code:
21:30:15 Error in expression <yFunc;
};
};
 
 
if (!_found) then {_path resize ((count _path) - 1)};
};
 
[_array>
21:30:15  Error position: <resize ((count _path) - 1)};
};
 
[_array>
21:30:15  Error Zero divisor
21:30:15 File ca\modules\functions\arrays\fn_findNestedElement.sqf, line 72
21:30:16 Error in expression <yFunc;
};
};
 
 
if (!_found) then {_path resize ((count _path) - 1)};
};
 
[_array>
21:30:16  Error position: <resize ((count _path) - 1)};
};
 
[_array>
21:30:16  Error Zero divisor
21:30:16 File ca\modules\functions\arrays\fn_findNestedElement.sqf, line 72

as well kinda off topic, but anyone having problems with C130Js not spawning anymore? these things worked fine, now i cant get them to spawn at all, both classnames

EDIT: i see this every so often aswell
Code:
Warning Message: No entry 'bin\config.bin/CfgWeapons.'.
22:36:51 Warning Message: No entry '.scope'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: Error: creating weapon  with scope=private
22:36:51 Warning Message: No entry '.displayName'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: No entry '.nameSound'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: No entry '.type'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: No entry '.picture'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: No entry '.Library'.
22:36:51 Warning Message: No entry '.libTextDesc'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: No entry '.model'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: No entry '.simulation'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: No entry '.fireLightDuration'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: No entry '.fireLightIntensity'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: No entry '.weaponLockDelay'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: No entry '.weaponLockSystem'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: No entry '.cmImmunity'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: No entry '.lockingTargetSound'.
22:36:51 Warning Message: Size: '/' not an array
22:36:51 Warning Message: No entry '.lockedTargetSound'.
22:36:51 Warning Message: Size: '/' not an array
22:36:51 Warning Message: No entry '.muzzles'.
22:36:51 Warning Message: Size: '/' not an array
 
Hey Stig, that would be great lol, i removed the killing a hacker lines as i mentuioned, im not using the Heli bomb script, i reverted back to the random loc script jsut to see about these sounds, im getting some new errors in the RPT now, not sure if any of you guys have seen this one any help would be awesome, lol

Code:
21:30:15 Error in expression <yFunc;
};
};
 
 
if (!_found) then {_path resize ((count _path) - 1)};
};
 
[_array>
21:30:15  Error position: <resize ((count _path) - 1)};
};
 
[_array>
21:30:15  Error Zero divisor
21:30:15 File ca\modules\functions\arrays\fn_findNestedElement.sqf, line 72
21:30:16 Error in expression <yFunc;
};
};
 
 
if (!_found) then {_path resize ((count _path) - 1)};
};
 
[_array>
21:30:16  Error position: <resize ((count _path) - 1)};
};
 
[_array>
21:30:16  Error Zero divisor
21:30:16 File ca\modules\functions\arrays\fn_findNestedElement.sqf, line 72

as well kinda off topic, but anyone having problems with C130Js not spawning anymore? these things worked fine, now i cant get them to spawn at all, both classnames

EDIT: i see this every so often aswell
Code:
Warning Message: No entry 'bin\config.bin/CfgWeapons.'.
22:36:51 Warning Message: No entry '.scope'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: Error: creating weapon  with scope=private
22:36:51 Warning Message: No entry '.displayName'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: No entry '.nameSound'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: No entry '.type'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: No entry '.picture'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: No entry '.Library'.
22:36:51 Warning Message: No entry '.libTextDesc'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: No entry '.model'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: No entry '.simulation'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: No entry '.fireLightDuration'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: No entry '.fireLightIntensity'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: No entry '.weaponLockDelay'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: No entry '.weaponLockSystem'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: No entry '.cmImmunity'.
22:36:51 Warning Message: '/' is not a value
22:36:51 Warning Message: No entry '.lockingTargetSound'.
22:36:51 Warning Message: Size: '/' not an array
22:36:51 Warning Message: No entry '.lockedTargetSound'.
22:36:51 Warning Message: Size: '/' not an array
22:36:51 Warning Message: No entry '.muzzles'.
22:36:51 Warning Message: Size: '/' not an array

You coded something improperly. Or, you added another mod/addon which is conflicting with current mods/addons. I suggest uninstalling/reinstalling each individually until you find the cause.
 
The air raid is working for me now, but the sirens aren't working.

Correction... The sirens ARE playing. But they are playing at the wrong location!

Also, its bombing 2 locations at once!

15:57:14 "AIRRAID: Random Location: 1 | Berezino"
15:57:16 "AIRRAID: INCOMING ATTACK: Sounding Siren at: 12043.9 9091.3 | Repeat: 29| Type: 1 | Duration: 60"
15:57:16 "AIRRAID: POS: [12043.9,9091.3,1.5] | TARGET: [12043.9,9091.3,1.5] | SHOULD MATCH"
15:59:00 "DEBUG FPS : 50" 16:02:01 "DEBUG FPS : 50.1567" 16:02:21 "AIRRAID: Bombing Area: 12043.9 9091.3"


For this particular incident the sirens are playing at GORKA; the bombs dropped at both Berezino and Gorka (but no sirens played at Berezino).



I have let the server continue running and the same holds true, the sirens will play at one location, but bomb 2 locations at once.

The sirens are playing in the correct location, but the server is telling the client to run them, rather than having the server run them. This causes the sirens to play randomly or at different locations. As for 2 or more locations being bombed at once, please go through and check the code again. If you look, Berezino is location 1, with the coords [12043.9,9091.3,1.5], it is bombing the correct location. The first line picked the location. The second line tells you how many bombs will be dropped (29), how long it takes for them to drop (1 minute), the type of bomb (type 1: 105 HE), and the location aka where to sound the siren. The third line checks the center coords of the raid, and the target is than ran and compared to the position of the raid. If the target and the raid position match, then the place will be bombed. The coords match 100% on all of the areas of the code. If your seeing 2 locations bombed at once, than you have a hacker on your server. All I can really say about that.
 
Just about everything you said there is wrong or you are totally missing the point of my post.

Code:
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]};

Yes, Berezino is the INTENDED target, and it does get bombed; however the sirens dont play there. The sirens did however play at Gorka for this particular incident, AND MOST IMPORTANTLY was bombed as well.

The repeat 29, tells you how many times the code will continue to run (how many different targets are supposed to be picked over the time the code is running); NOT HOW MANY BOMBS ARE DROPPED.

There is no hacker on the server, because it is being run locked with only myself in it. If I had to guess the code is somehow executing twice per loop, one time picking at random a location for the bombing, and another time picking a place to put the siren and bombs. I'm no coding expert but that looks to me what is happening.
 
@Sabbath

Hello mate,

Did you ever have any joy with calling ingame sounds?

Or anybody for that matter?

Cheers!
 
Ok, so got this is working (Panthera 1.8) without the sounds as I will try to get an ingame sound. So far via editor have only found this sound Sirene_EP1

Anyone know how to call ingame sounds?

Does it loop? How can this be controlled? It goes off on server restart once only.

Help gratefully received :)
 
@ALL: I'm back from Coachella! Time to get back into this. Some individual responses at the end

Ok So from what I gather...
---> most people are having a hard time getting the sirens to play?
---> there seems to be some bug where a second location is being bombed at the same time?

I will update the random script from the first post (hopefully) by mid afternoon tomorrow, with an attempt to debug the bombing positions further and add some if clauses to prevent double selections, as well as going over the code with a fine tooth comb to determine if it's just something silly like me forgetting to delete a target vehicle which causes more bombs to spawn off of it.

I will update the super alpha unworking heli bombing ai script as soon as I can as I fix the compile issues we're seeing where the variable types are mismatched, and the array problems. Do not use this script until I have updated it.

@tay200k and others who've tried the new script with AI choppers = this was untested and it looks like I messed up the formatting of at least one variable. I'll get to fixing this ASAP.

@FAQdaWorld = Thank you. I'm going to look into this bug, I'm not sure why this would happen but I will have to go over the code in more detail.

@Dlcoates1 = What FAQ said. But what's this about the script telling the client to run them? Care to explain how to do it in another manner? I'd appreciate it!

@Sabbath = did you get it working again?

@stig = glad you got it at least partially working! how are you calling the script? My sounds are between 1-3 mins, so no looping is necessary (it's a pain), but one is only 7 secs long or so.

@matthewjknott = I have it working correctly on my server, so far I have not noticed any areas being bombed simultaneously - however I will be working on an updated script to ensure that never happens, and doing further testing to determine what caused it anyways.
 
DEBUG RANDOM SCRIPT:


EDIT-----> Seems I can't get the _pos2 = position _espl; to give me a value in the RPT log - first I just called it like I would any of the other _pos, but that was returning just 'array' - just tried using str(_pos2) in the diag_log but that isn't working either, just blank space. More research is needed.

The same script, with added diag logs so we can see what's going on in your RPT logs . I've just added and run it on my server, so there aren't any typos. Getting an array return on the position of the _espl vehicles (explosions) so maybe they're sticking around longer than they should. I've deleted the _espl vehicles in this script later on now. If the locations match, like them do on mine, then the only reason I can think of is things are running client side and so timings are getting borked.

One other thing - I've added a delete vehicle command on the espl in case they were just creating a million explosions that never went away....but this may unnaturally remove the smoking remains from the explosions so it may require tweaking.

This script will add messages to your RPT log for every time the siren is created, and every time a bomb is created. The message should look like this:

AIRRAID: SIREN: [9659,8795.3,1.5] | TARGET: [9659,8795.3,1.5] | SHOULD MATCH APPROX

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
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
 
diag_log format ["AIRRAID: Bombing Area: %1 %2",_xpos,_ypos];
//start bombing
While {_seconds > 1} do {
_sound = createVehicle ["HeliHEmpty",position _target,[], _ray, "NONE"];
_sound say ["mortar1",1000];
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 = position _espl;////////////////////////this is returning array...why not any of the others
diag_log format ["AIRRAID: BOMB: %1 | TARGET: %2 | SHOULD MATCH APPROX",str(_pos2),_targetpos];
_seconds = _seconds - 1;
deletevehicle _sound;
};
_pos2 = position _espl;
diag_log format ["AIRRAID: BOMB: %1 | TARGET: %2 | SHOULD MATCH APPROX",str(_pos2),_targetpos];
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
 
Does anyone but me have the sirens playing?

Just to clarify to everyone - I have the script working correctly on my server - it bombs only one location so far as I have been able to tell, and the sirens play correctly (and sound awesome!). I am using the random script, from my OP and from the most recent post, both are working for me.

I have tested with 3 people so far, seemed to be working , but I will do more testing with more people ASAP.

So yeah, it is working for me! Perfectly so far! Let's get it working for you!
 
Back
Top