georgischer Maschinengewehr 19 Posted August 12, 2017 Hello I want Ai Bm-21 grad to fire at a specific target or custom marker location. I need the BM-21 grads full artillery barrage. not firing rockets one by one. I've searched almost all the scripts or solutions, but everything's pretty old and none of those worked. I use ACE, JSRS, RHS and some small additional mods that has nothing to do with my problem. could you PLEASE suggest me something? please do not just search some old links and just ctrl-c and ctrl-v because I've been searching everything for 5 hours maybe. I couldn't make default arma3 mortars (mk6) working either. my scenario is something like - Enemy infantries are attacking a town where artillery should do supporting fire (in this case Ai firing BM-21 barrages) I am planning to set 4 BM-21 grad unit in my mission. please, I really need your help guys, I've learned so much from all of you and this forum and I'm so thankful for that. so I set my hopes on you guys that you'll help me. thanks. Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted August 12, 2017 You could use setWeaponReloadingTime for this, works great to simulate rocket artillery barrage if you keep the value (percentage of the weapons reloading time, so varies for every weapon) at feasible amounts. Cheers Share this post Link to post Share on other sites
georgischer Maschinengewehr 19 Posted August 12, 2017 12 hours ago, Grumpy Old Man said: You could use setWeaponReloadingTime for this, works great to simulate rocket artillery barrage if you keep the value (percentage of the weapons reloading time, so varies for every weapon) at feasible amounts. Cheers thanks for the answer, but how can I use it? I am not good with scripting and modding yet :( Share this post Link to post Share on other sites
7erra 629 Posted August 12, 2017 this addEventHandler ["Fired", { params ["_unit","_weapon","_muzzle","_mode","_ammo","_magazine","_projectile","_gunner"]; vehicle _unit setWeaponReloadingTime [_gunner, _muzzle, 0]; vehicle _unit setAmmo [_weapon, (vehicle _unit ammo _muzzle) +1]; }]; Add this to the init line of your mortar/artillery. This gives you a nearly unlimited fire rate. You may want to change the 0 to something above 0 because otherwise the AI is able to fire instantly which may lead to some unpretty artillery barrages. Also the last line (setAmmo) isn't mandatory to make it work. This gives the vehicle an unlimited supply of ammunition therefore no need to reload or resupply. Share this post Link to post Share on other sites
georgischer Maschinengewehr 19 Posted August 12, 2017 39 minutes ago, 7erra said: this addEventHandler ["Fired", { params ["_unit","_weapon","_muzzle","_mode","_ammo","_magazine","_projectile","_gunner"]; vehicle _unit setWeaponReloadingTime [_gunner, _muzzle, 0]; vehicle _unit setAmmo [_weapon, (vehicle _unit ammo _muzzle) +1]; }]; Add this to the init line of your mortar/artillery. This gives you a nearly unlimited fire rate. You may want to change the 0 to something above 0 because otherwise the AI is able to fire instantly which may lead to some unpretty artillery barrages. Also the last line (setAmmo) isn't mandatory to make it work. This gives the vehicle an unlimited supply of ammunition therefore no need to reload or resupply. thanks a lot, I'll try this soon. Location Germany - always loved Germany, especially after living in Berlin for a year. Share this post Link to post Share on other sites
georgischer Maschinengewehr 19 Posted August 13, 2017 Okay, this script didn't work or I did something wrong. I used simple artillery requester module. it worked, but it writes that I can use only 9 rocket from BM-21 grad when I want full barrage (40 rocket) can I increase 9 rocket to 40? in support provider module Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted August 13, 2017 5 hours ago, pkmlover said: Okay, this script didn't work or I did something wrong. I used simple artillery requester module. it worked, but it writes that I can use only 9 rocket from BM-21 grad when I want full barrage (40 rocket) can I increase 9 rocket to 40? in support provider module Using the module you'll run into limits like this pretty soon. Too bad BI doesn't take full customization of parameters into account when creating these modules. Try using an addAction instead, you can still add it to individual players only and decide when to add it, also you can manipulate pretty much everything inside the code field. At first put this modified version of @7erra snippet into the init.sqf TAG_fnc_reduceReloadingTime = { params ["_gun"]; _gun addEventHandler ["Fired", { params ["_unit","_weapon","_muzzle","_mode","_ammo","_magazine","_projectile","_gunner"]; vehicle _unit setWeaponReloadingTime [_gunner, _muzzle, 0.1]; vehicle _unit setAmmo [_weapon, (vehicle _unit ammo _muzzle) +1]; }]; }; This will make it available as a function, a bit more readable to work with if you have other stuff going on in the objects init field. Use 0.1 as a reloadTime number instead of 0. This is the percentage from the initial reloadingtime that will be used. Lets say the 155mm has 6s reloading time, a value of 0.1 will reduce it to 0.6s. In the arty guns init field simply put: this call TAG_fnc_reduceReloadingTime Now to actually make the artillery fire on the target area with added spread you could use this from inside a trigger, addAction etc: _guns = [gun1,gun2,gun3,gun4,gun5,gun6];//your artillery guns in here _targetpos = getmarkerpos "village01";//your targetposition in here _radius = 125;//the radius of the dispersion around the target position _rounds = 40; { _firingPos = _targetpos getPos [_radius * sqrt random 1, random 360];//get a random position around targetpos with uniform distribution, thanks to kk _x commandArtilleryFire [_firingPos,currentMagazine _x,_rounds]; } forEach _guns; Keep in mind that artillery in vanilla arma will always use high angle fire, so you need to place them a certain distance away from the target, 10km+ should do. Cheers Share this post Link to post Share on other sites
georgischer Maschinengewehr 19 Posted August 13, 2017 Grumpy Old Man thank you. I'll check this soon. meanwhile I am trying to find some normal dynamic AI spawn module for RHS units Share this post Link to post Share on other sites
georgischer Maschinengewehr 19 Posted August 15, 2017 Grumpy Old Man I put the init.sqf in Arma3 missions directory (in my mission) Quote this call TAG_fnc_reduceReloadingTime I put this in init field of BM-21 grad On 8/13/2017 at 10:55 AM, Grumpy Old Man said: _guns = [gun1,gun2,gun3,gun4,gun5,gun6];//your artillery guns in here _targetpos = getmarkerpos "village01";//your targetposition in here _radius = 125;//the radius of the dispersion around the target position _rounds = 40; { _firingPos = _targetpos getPos [_radius * sqrt random 1, random 360];//get a random position around targetpos with uniform distribution, thanks to kk _x commandArtilleryFire [_firingPos,currentMagazine _x,_rounds]; } forEach _guns; I copied this, put in my trigger with "Activation : radio Alpha: doesn't work :( I guess I am doing something wrong Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted August 15, 2017 Works fine for me. Do you get any errors? Did you place a marker or a custom position and named the guns correctly? Are you sure the radio action is triggering? Try it with vanilla assets (tested with MLRS Sandstorm). Repro mission on altis with MLRS and working script, only thing I changed is I put the firing routine in its own function for ease of use and tweaked the rounds and reloadtime numbers. Cheers Share this post Link to post Share on other sites
georgischer Maschinengewehr 19 Posted August 15, 2017 Grumpy Old Man thanks a million man!!!! you rock!!!!!! I had copied something wrong into my trigger. that's why it didn't work. thanks a lot again, thank you for creating custom mission for me I've been looking for this script maybe for 2 years. 1 Share this post Link to post Share on other sites
conz 1 Posted September 28, 2017 I know this is a slight thread hijack but what I need is so similar to this that I didn't think it a good idea to spread it out to a new thread. I found out by chance that the RHS BM-21 will not fire at targets beyond roughly 4000-4500m even though they are in range. Manual works up to 10k (i think that was the max range .. could be further) All other arty works just fine with this script even at high range. I am *guessing* it is somehow not able to select the correct range magazine as the bm-21 has an above average amount of these.. Anyone know of a way to circumvent this ? Share this post Link to post Share on other sites
Mr H. 402 Posted September 29, 2017 also if you're using ace 3 note that if you have disabled the artillery computer for players and/or enabled manual reload from the ace 3 artillery module, AI won't fire. Share this post Link to post Share on other sites
conz 1 Posted October 4, 2017 On 9/29/2017 at 6:34 AM, Hadrien Melville said: also if you're using ace 3 note that if you have disabled the artillery computer for players and/or enabled manual reload from the ace 3 artillery module, AI won't fire. It shoots though, just not beyond 4500m-ish. Share this post Link to post Share on other sites