Air raid - bombing and siren

You need to change this:

rndSel=floor(random 49); //select random number 0-49, then set loc based on the case number

So it is random(13);
as you have changed the number of cases - it's trying to pick a case between 1-49, and you only have 13 cases.
Thank you so much, you are the best! Great response, and perfect help. Mod is amazing. Thanks. :D
 
The mod has been running great. I left mine alone for a few hours and checked RPT logs to see if I could catch another bomb raid, but I noticed that the same error came up later on.... and stopped all of the bomb runs. The server has been running perfectly fine with the mod. They worked perfectly for quite a while. What do you think the issue is here?

Is the mod supposed to repeat cycles, or does it hit every city once, then quits?

Error:
Code:
4:06:00 Error in expression <,2758.7144,5304.3457]};
};
_city = _loc select 0;
_z = _loc select 1;
_xx = _loc>
4:06:00  Error position: <select 0;
_z = _loc select 1;
_xx = _loc>
4:06:00  Error select: Type Bool, expected Array,Config entry
4:06:00 File z\addons\dayz_server\compile\server_airRaid.sqf, line 56
 
The mod has been running great. I left mine alone for a few hours and checked RPT logs to see if I could catch another bomb raid, but I noticed that the same error came up later on.... and stopped all of the bomb runs. The server has been running perfectly fine with the mod. They worked perfectly for quite a while. What do you think the issue is here?

Is the mod supposed to repeat cycles, or does it hit every city once, then quits?

Error:
Code:
4:06:00 Error in expression <,2758.7144,5304.3457]};
};
_city = _loc select 0;
_z = _loc select 1;
_xx = _loc>
4:06:00  Error position: <select 0;
_z = _loc select 1;
_xx = _loc>
4:06:00  Error select: Type Bool, expected Array,Config entry
4:06:00 File z\addons\dayz_server\compile\server_airRaid.sqf, line 56
Ok looks like the same error, drop random down a number and retest. Also check you syntax again - just to be sure nothing is messed up (missing { or [ or " or ; or anything else.)

_repeat determine the number of times the code will run. Each time the code selects a city at random as the location to bomb.

So it's possible a city will be bombed twice, or not at all.
 
I noticed the repeat is set to 30. Just a quick question. At the end of the 30 times does it restart or do i have to set it to like 50,000 in order for it to keep on going without stopping ?
 
You are correct in that it will only run while repeat > 0.

If you want infinite, change the while loop
while (_repeat > 0)
To
while (true)
And the while loop will run forever.
 
I reckon it would be good to use Sarges AI for the squad drops/turning it into a crash site since his script so largely used already. Myself and the players on my server are all looking forward to your progress with this mmmyum :D.
 
Ok looks like the same error, drop random down a number and retest. Also check you syntax again - just to be sure nothing is messed up (missing { or [ or " or ; or anything else.)

_repeat determine the number of times the code will run. Each time the code selects a city at random as the location to bomb.

So it's possible a city will be bombed twice, or not at all.

Server has been running fine with the mod again today. I finally got home to check on it again, and I noticed that this time, the mod just.... quit, according to the RPT logs at least. Not a single error, but the RPT never gave me another log for the mod after,
Code:
17:56:26 "AIRRAID: BOMBER: Mi-24D | Lift Off at [1623.71,218.188,300] | with Backup WP [7492.67,15263]"
17:56:26 "AIRRAID: BOMBER: Mi-24D | TYPE: Mi24_D |"
17:56:27 "AIRRAID: BOMBER: Mi-24D started flying from [1623.71,218.188,300] to [10316.2,2250.86] NOW!(TIME:1011|)"
17:56:27 "AIRRAID: BOMBER: LANDINGZONE: [10316.2,2250.86,0] | BOMBER POS: [1623.71,218.188,131.48] | POS LAND: [10316.2,2250.86]"

Here is my edited file: http://pastebin.com/NXVHVKpT, i don't think anything is wrong with it....
 
Server has been running fine with the mod again today. I finally got home to check on it again, and I noticed that this time, the mod just.... quit, according to the RPT logs at least. Not a single error, but the RPT never gave me another log for the mod after,
Code:
17:56:26 "AIRRAID: BOMBER: Mi-24D | Lift Off at [1623.71,218.188,300] | with Backup WP [7492.67,15263]"
17:56:26 "AIRRAID: BOMBER: Mi-24D | TYPE: Mi24_D |"
17:56:27 "AIRRAID: BOMBER: Mi-24D started flying from [1623.71,218.188,300] to [10316.2,2250.86] NOW!(TIME:1011|)"
17:56:27 "AIRRAID: BOMBER: LANDINGZONE: [10316.2,2250.86,0] | BOMBER POS: [1623.71,218.188,131.48] | POS LAND: [10316.2,2250.86]"

Here is my edited file: http://pastebin.com/NXVHVKpT, i don't think anything is wrong with it....
Looks like the bomber exploded before it got past the siren start.
Basically the code waits until the bomber is within a certain distance, then starts the sirens - but if the bomber dies before it gets there, code just waits forever. Fixed in new version, which is just going into testing right now (update later today!)

EDIT: brianson - you don't have a case 0 for the location selector. it will error out if floor(random#) returns 0
 
Looks like the bomber exploded before it got past the siren start.
Basically the code waits until the bomber is within a certain distance, then starts the sirens - but if the bomber dies before it gets there, code just waits forever. Fixed in new version, which is just going into testing right now (update later today!)

EDIT: brianson - you don't have a case 0 for the location selector. it will error out if floor(random#) returns 0
Thanks for the information and all of the help you have given me. I corrected the issues and they fly to the towns and everything, including sirens, work. However... the bombs don't explode now. They whistle, then nothing happens. You just keep hearing whistling. I would appreciate any suggestions. Again, thanks for your help.
My file: http://pastebin.com/AQEpv0Bm
 
Thanks for the information and all of the help you have given me. I corrected the issues and they fly to the towns and everything, including sirens, work. However... the bombs don't explode now. They whistle, then nothing happens. You just keep hearing whistling. I would appreciate any suggestions. Again, thanks for your help.
My file: http://pastebin.com/AQEpv0Bm
Try changing _choice to 1
If you've got sirens, and the choppers are getting there - everything is working as expected, except maybe you can't display that bomb type for whatever reason. Try light - i know it works for sure, well, I think.

No errors in your RPT? anything about killed a hacker, or deleting a vehicle (_sound or _espl). Sounds like it's running just fine.
 
UPDATE: LIVE! LAST UPDATE 1030 PM EST may2 2013 RANDOM ANIMAI
will be added to OP after further testing.


Installation: Just replace old server_airRaid.sqf with new one in dayz_server.pbo!

<<< http://pastebin.com/LR3LEaHf >>> NEW at 1030pm EST

---------------Damn we updatin, son! RC2 - it's looking good, new options, more optimizations


! alpha quality - needs more testing. Should work just fine, but may have issues. Update: resolved some issues, further testing needed

(old ones)
---->>>>> PASTEBIN <<<<<---- NEW at 620pm EST may2. some optimizations.
---->>>>> PASTEBIN <<<<<---- NEW at 4 am EST may2. functioning well.
---->>>>> PASTEBIN <<<<<---- NEW at 245 am EST may2
---->>>>> PASTEBIN <<<<<----original update



Includes -
Much easier to understand code! More comments, only 2 mandatory setup sections.
Random type of bomb - chooses bomb type at random (toggleable)
Random bomb drop timing - should feel more varied with a random delay between bombs (also random delay in sirens!)
Additional random bomb - still feeling too much like a ticking clock? This adds an additional bomb, with additional random timer!
Better chopper positioning!
Toggle AI spawns & set number of times to spawn AI
If chopper dies, script will continue, but bombs will not be dropped. No more hangs!
Reduced RPT spam
Should start bombing almost right away as bomber arrives! (may be delay if close to spawn in point)
Sirens only sound as bomber approaches, when within 6500 m. May only be 1 min of sirens before bomber arrives (more like real life!)
STATIC OPTION!!!!!!
Making it optimized
Prewaypoints going into testing - now that sirens play properly, we need some more time between take off and bombing!
 
I reckon it would be good to use Sarges AI for the squad drops/turning it into a crash site since his script so largely used already. Myself and the players on my server are all looking forward to your progress with this mmmyum :D.
Going to install Sarges AI tomorrow on my test server when I get a chance - and look into how he calls for AI spawns and see what we can do about getting them to spawn nicely from my script.

@All
Update is working well, very functional.
May be having trouble with getting the siren loop to play, look for AIRRAID: Playing Siren at .... in your RPT and report back to me.
Also please let me know if the positions that follow AIRRAID: DEBUG ESP3: match up, if they work properly (and the heli seems to be over the city at all times) I will make the bombs spawn under the helis current position!
Finally, please tell me if there are performance issues! Looks great on my server, but let me know!
 
Going to install Sarges AI tomorrow on my test server when I get a chance - and look into how he calls for AI spawns and see what we can do about getting them to spawn nicely from my script.

@All
Update is working well, very functional.
May be having trouble with getting the siren loop to play, look for AIRRAID: Playing Siren at .... in your RPT and report back to me.
Also please let me know if the positions that follow AIRRAID: DEBUG ESP3: match up, if they work properly (and the heli seems to be over the city at all times) I will make the bombs spawn under the helis current position!
Finally, please tell me if there are performance issues! Looks great on my server, but let me know!

Sweet :) Just trying out your latest script now.

I have always had the rmodyn set to true despite not running rmod on our server and it has worked fine. Though with this I tried disabling it.

_rmodyn = 0; //true if you have rMod, 0 if you don't (choice of heli bomber)

For the first time so far, it didn't work. Said something in the RPT about trying to spawn a heli but didn't actually spawn anything. Unfortunately I didn't copy the log and I have to start my server normally now since I've had it offline all morning for testing (players are eager to get back on). I'll try and post it here tomorrow if it'd still help by then.

I set rmodyn to true again and it's working fine now.
 
Typo in my comment. Should be true or false, never a number.

You're not the first to report that it works without rmod! Great news, but I still don't think that will work for everyone.
 
Awesome work, I love the fact you're updating this constantly and providing so much good support.

All the things you're working on is great, since the MV22 flies around rather fast in a circle, and I don't really trust it landing correctly and not blowing up all the AI soldiers, would it be possible to have them parachute out the rear, not to mention it'd look rather badass.

ALSO - Would it be possible to have the radius of bombing be diff for each town? - Some towns being larger than others, it's a bit odd having it bomb half a town.
 
Awesome work, I love the fact you're updating this constantly and providing so much good support.

All the things you're working on is great, since the MV22 flies around rather fast in a circle, and I don't really trust it landing correctly and not blowing up all the AI soldiers, would it be possible to have them parachute out the rear, not to mention it'd look rather badass.

ALSO - Would it be possible to have the radius of bombing be diff for each town? - Some towns being larger than others, it's a bit odd having it bomb half a town.
Thanks man!
I totally agree, the AI pilots suck (who crashes into a mountain?!) that's just arma for ya.

In the new version, chopper should stop and hover if it can (can the Mv22? Haven't seen it yet since the update EDIT: no it cant, with sometimes explosive consquences. choppers work great tho). Also it should hover about 15 m above ground while spawning the AIs (and only after bombing is complete)...I think. Haven't seen an airraid in game since the last update.

But hell yes man, parachuting is on my list of things to do (someone didn't make it into the todo comment section.)
---Does anyone know if spawning the AI's at say z = 350 (height) will make them parachute automatically? (for any AI script)
----If they spawn in water they swim automatically...

Regarding making a radius for each town - maybe in an update!
---I'm kind of thinking that I might rewrite the bombing section completely so it runs a nearestBuildings count - gets the closest buildings and puts them in an array - then go through the array with a forEach, set a 'destroy' waypoint on the building, drop a few bombs on it and move to the next building.
-----This way it would hit the entire town with bombs before spawning AIs, regardless of size. But it might ruin the random pattern that we're getting now.

Newest Pastebin minor update (typos in comments corrected, waituntil added, values tweaked)
http://pastebin.com/VrXR99mv (RC1) 6pm EST STABLE but newer version available
http://pastebin.com/u71ETBmB (edited) 420 pm EST
http://pastebin.com/u71ETBmB 3pmEST
http://pastebin.com/k8yuYtzy 2pmEST
 
The new update has everything working now. Thanks. I have a slight issue with the AI spawning though.... I run sarg's AI, and I keep getting this error code:
Code:
AIRRAID: BOMBER: AISPAWN: [13022.3,7046.23,15.0136] | NUMBER 6"
21:53:11 Warning Message: Script units\add_unit_server_band.sqf not found
Usually after this code, I get this:
Code:
"AIRRAID: BOMBER: Mi-24V Leaving Area [13022.3,7046.23,15.9609]"
And everything stops.... and the mod doesn't work anymore for the rest of that restart. What do I need? I see an add on for units?

EDIT: I realised the message that you put up about Sarg's AI. I should have read first. :p I will try to manually fix it myself, but if anyone has any suggestions on what code I should replace the default with, that would be very helpful.
 
EDIT: I realised the message that you put up about Sarg's AI. I should have read first. :p I will try to manually fix it myself, but if anyone has any suggestions on what code I should replace the default with, that would be very helpful.
Make sure you're using the newest version FINAL RELEASE COMING WITHIN 24HR
New version: http://pastebin.com/LR3LEaHf RC2 (static option, optimized, prewaypoints testing) 1030pm THIS BUILD TESTING
New version: http://pastebin.com/VrXR99mv release candidate
6pm EST THIS BUILD STABLE
This is what I'm running right now. It should fix the problem regarding MV22s hitting stuff and blowing up because they can't hover (they'll fly a little higher). So far I've got no bugs - everything is working as supposed to. (by the way, sirens will only sound while the bomber is approaching, no more 5 min warning - may only be 1 min!)

As to your problem, Brianson - in one of my alpha version updates I think sometimes the chopper gets to it's despawn point but doesn't get deleted and just hangs - I didn't leave it long enough to confirm, just changed the number so now it should never happen:) I don't think it had anything to do with trying to call the AI script, which like you said, you gotta set up.

Try the new update and let me know of any bugs - I will continue to test another full round, then I will update the OP with the new script.

Next update - Static option!
 
RELEASE VERSION TESTING -- RC5 --- PERFECT ON MY SERVER!

Guys, before I add this to the OP, I need help testing - newest airraid script - 05/05/2013 7pmEST


UPDATE: LIVE! 7 PM EST may5 2013 RANDOM&STATIC ANIMAI
FINAL TESTING !!!! PLEASE REPORT STABILITY!


Installation: Just replace old server_airRaid.sqf with new one in dayz_server.pbo!

<<< http://pastebin.com/1cZbwFRC>>> NEW at 7pm EST

---------------Damn we updatin', son! RC5 - it's looking good, new options, more optimizations
REPORT ALL BUGS!


! release quality - final testing. Works perfectly for me!
 
hey mmmyum, first off: great work!
non-animated version will not be updated at this time, maybe later if there is demand.
there is demand. ;)

edit: noticed that only small spots of large cities are getting bombed. would be great if it's possible to expand the radius or attack multiple coordinates at the same time (e.g. all "parts" of berenzino).
 
Back
Top