katdogfizzow 13 Posted December 19, 2016 getting undefined variable in expression _posiiton maybe you have a mission example? awesome looking script. nvmd. added xyz and works. way cool! 1 Share this post Link to post Share on other sites
ShiftyFR 14 Posted February 18, 2017 Same here, can't get them firing, error line 42 1 Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted February 18, 2017 Changed the script so if no position is handed to the function it will use a random position near the first AA vehicle instead. Cheers 2 Share this post Link to post Share on other sites
ShiftyFR 14 Posted February 18, 2017 41 minutes ago, Grumpy Old Man said: Changed the script so if no position is handed to the function it will use a random position near the first AA vehicle instead. Cheers Nice ! Working now ! I have a question : Is it possible to set some azimut (in exemple, i want my AA gun to shoot between 270° and 360°) or we need to create position ? If it needed(to create vitual position), can you explain a little more how to this ? Thanks :) Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted February 18, 2017 1 hour ago, Shifty.FR said: Nice ! Working now ! I have a question : Is it possible to set some azimut (in exemple, i want my AA gun to shoot between 270° and 360°) or we need to create position ? If it needed(to create vitual position), can you explain a little more how to this ? Thanks :) You can take one of the AA guns as reference, likely AA1: _rndDistance = random [250,500,1000]; //picks a random number between 250,500 and 1000, with most times being near 500 (gauss distribution) _direction = random 360; _pos = AA1 getRelPos [_rndDistance, _direction]; //will return a position relative to AA1 at the set distance and direction Cheers Share this post Link to post Share on other sites
ShiftyFR 14 Posted February 18, 2017 Did I put it in the GOM_fnc_ambientAA.sqf ? Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted February 18, 2017 No, just use the _pos variable from my example inside the positions array when calling the function. Take a look at the parameters section in the first post, all explained there. Cheers Share this post Link to post Share on other sites
Jnr4817 215 Posted February 18, 2017 Say I wanted the AA to fire at a flying helo that is carrying players as the beginning of a mission without doing any damage, as I have a script for that already? Once the helo "crashes" your AA script stops. Thanks Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted February 19, 2017 10 hours ago, Jnr4817 said: Say I wanted the AA to fire at a flying helo that is carrying players as the beginning of a mission without doing any damage, as I have a script for that already? Once the helo "crashes" your AA script stops. Thanks This script only simulates flying objects that AA guns are firing at. If you want regular AA units to fire at a halo that's vanilla functionality. Cheers Share this post Link to post Share on other sites
Jnr4817 215 Posted February 20, 2017 15 hours ago, Grumpy Old Man said: This script only simulates flying objects that AA guns are firing at. If you want regular AA units to fire at a halo that's vanilla functionality. Cheers Excellent work by the way, thank you for the clarification. 1 Share this post Link to post Share on other sites
orcinus 121 Posted March 12, 2017 Nice script, many thanks for sharing :) Share this post Link to post Share on other sites
Guest Posted March 12, 2017 Seems I missed an update. New version frontpaged on the Armaholic homepage. GOM - Ambient AA v1.1.3 Share this post Link to post Share on other sites
Coolie 0 Posted March 20, 2017 Super cool scrip! Any chance you could add an example mission to go with it? Thanks for this awesome mod sir! Share this post Link to post Share on other sites
sarogahtyp 1108 Posted April 24, 2017 Hey Grumpy, I m using ur Carpet Bomb Script at my domination server and I ll try to combine it with ur ambient AA now. Maybe you could implement those possibilty in future to make it easy to combine both scripts to get an ambient bomb carpet attack together with ur ambient AA? Just a suggestion. Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted April 24, 2017 You could easily declare a position for the AA to fire at, and call the carpet bombing script on the same position. Just use both functions at once on the same position, note that ambient AA requires an array of positions. Cheers Share this post Link to post Share on other sites
Tomas Scarle 2 Posted July 7, 2017 Quote You can also add and array of positions (ASL) to make the guns fire at them randomly. Im sorry for being stupid, but can you explain this? I have no idea what these are. I can do everything else no problem but I have no idea what an array of positions is or how to implement them. Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted July 7, 2017 33 minutes ago, Tomas Scarle said: Im sorry for being stupid, but can you explain this? I have no idea what these are. I can do everything else no problem but I have no idea what an array of positions is or how to implement them. It's entirely optional, the guns will automatically fire at random positions. If you want them to fire at your own set of positions, probably to simulate an airborne threat coming from a specific direction you could hand your own positions array to the script, so the guns will aim at a random position out of your array. You could place a few markers on the map, name them AAtarget1, AAtarget2, AAtarget3 etc. then call this: GOM_fnc_markerToASL = { params ["_markers","_minAltitude","_height"]; _positionsASL = []; _markers apply { _pos = getmarkerpos _x; _pos set [2,_minAltitude + random _height]; _positionsASL pushback _pos; }; _positionsASL }; markertest = [["AAtarget1","AAtarget2","AAtarget3"],250,100] call GOM_fnc_markerToASL; copytoclipboard str markertest; Will generate ASL positions above your markers, with a minimum above sea level (ASL) altitude of 250 and randomly add 100m to that altitude. You can now paste the clipboard content to the positions array where you call the script, the guns will now fire at positions in the air above those markers. The markers can be deleted afterwards and are not needed inside the mission. Cheers Share this post Link to post Share on other sites
Tomas Scarle 2 Posted July 17, 2017 Im sorry I am still not following this. Is there any chance of an example mission? Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted July 17, 2017 3 hours ago, Tomas Scarle said: Im sorry I am still not following this. Is there any chance of an example mission? I don't see the point, still added an example mission of the bare minimum you need to do to get this running. It's a simple copy paste and create one file. Won't get any easier than that. Cheers Share this post Link to post Share on other sites
Coolie 0 Posted July 28, 2017 Hi, the SP Demo Mission link is broken ;( Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted July 29, 2017 8 hours ago, Coolie said: Hi, the SP Demo Mission link is broken ;( Should be working now. Cheers Share this post Link to post Share on other sites
Coolie 0 Posted July 31, 2017 Oh man! this is awesome! Share this post Link to post Share on other sites
diehardfc 41 Posted September 8, 2017 Grumpy, this is another fantastic script. It really brings the area of operation to life. I am wondering: is there a best practice for setting up multiple groups of AA? For example, say I have a long coastline, such as Bornholm, and I want some AA in the southeast but also in the northwest, with a couple of kilometers between them. If I put them in the same array, it won't work because they'll all fire at a target somewhere in the middle, right? Could I make discreet clumps of them firing at overhead targets? Would it be as simple as renaming the script and calling that or would two instances interfere with one another? Thanks in advance if you can suggest a workaround! Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted September 8, 2017 1 hour ago, diehardfc said: Grumpy, this is another fantastic script. It really brings the area of operation to life. I am wondering: is there a best practice for setting up multiple groups of AA? For example, say I have a long coastline, such as Bornholm, and I want some AA in the southeast but also in the northwest, with a couple of kilometers between them. If I put them in the same array, it won't work because they'll all fire at a target somewhere in the middle, right? Could I make discreet clumps of them firing at overhead targets? Would it be as simple as renaming the script and calling that or would two instances interfere with one another? Thanks in advance if you can suggest a workaround! Simply execute the function multiple times with different guns: //place 4 AA guns on north coast and name them northAA1-northAA4 _northGuns = [northAA1,northAA2,northAA3,northAA4]; _northAA = [_northGuns,5] execVM "GOM_fnc_ambientAA.sqf"; //do the same for south coast _southGuns = [southAA1,southAA2,southAA3,southAA4]; _southAA = [_southGuns,5] execVM "GOM_fnc_ambientAA.sqf"; //etc Don't see why it shouldn't work. Cheers Share this post Link to post Share on other sites
diehardfc 41 Posted September 11, 2017 This worked great - thanks very much! 1 Share this post Link to post Share on other sites