-D:W- CryHavok 10 Posted July 11, 2009 Hi, i am a bit of a noob at mission editing, and i was wondering if anyone can help or point me in the right direction! I am making a mission with objectives to destroy a few opfor grad arty units, is there any way i can script the Ai to fire the Grads rockets around 1 round per minute (or untill out of ammo) continually at a location? it does not matter of the location just as long the grad fires up to give the impression of the arty firing. I have used the Arty and Socom modules and can call arty in myself, but when it come to scripting the Ai i don't have a clue how to do this. Thanks in advance for your help! Share this post Link to post Share on other sites
Carpaazi 0 Posted July 11, 2009 I need this also, couldn't make this work with any "fire" commands Share this post Link to post Share on other sites
Carpaazi 0 Posted July 11, 2009 i came to think of it... is GRAD's "firing" a "muzzle" effect by change? Haven't tried it,but if someone is reading this, you could check it because im too busy xD. Also there was topic of making ZU AA gun firing on the sky,that could work also Share this post Link to post Share on other sites
Kryptech 0 Posted July 11, 2009 For simplicity I just put an MLRS named art1 a civilian car named car1 and 2 switches. Switch 1 Radio Alpha - art1 doTarget car1. Switch 2 - art1 fire "MLRS". It worked perfectly. Replace "MLRS" with "GRAD" for the russian mobile artillery. I am sure you will want to put this into a script and all, and prolly want to have the arty angle set to something so it is pointing up, but that is another problem. If I work all this out myself I will post the script here. Share this post Link to post Share on other sites
-D:W- CryHavok 10 Posted July 11, 2009 Thanks Kryptech, that would be great! Share this post Link to post Share on other sites
Carpaazi 0 Posted July 12, 2009 I just need AI unit to aim at target (that it does) and fire some d**n rockets, but can't make AI fire them =/ Share this post Link to post Share on other sites
killswitch 19 Posted July 20, 2009 (edited) Here's a small example mission that has a battery consisting of three BM-21 vehicles: test_grad_rocket_arty.zip. Each BM-21 has 40 rockets and the battery will fire all 120 rockets with a five second interval between rockets. The battery is scripted to fire at the target marker just east of Chernogorsk. It does this via the Artillery Module function BIS_ARTY_F_ExecuteTemplateMission in the trigger placed where the battery is. (One can call this function elsewhere, the trigger is just one way of doing it) [rocket_arty, getMarkerPos "target", MyHETemplate] call BIS_ARTY_F_ExecuteTemplateMission "rocket_arty" is the name given to the blue Artillery Module unit placed via the F7 - Modules in the editor. The target position is set to the location of the marker named "target". The fire mission details are held in the global variable MyHETemplate The variable MyHETemplate is set as follows: MyHETemplate = ["IMMEDIATE", "HE", 5, 120]; That means "fire 120 HE rockets with a 5 second interval". You can "mapclick" yourself somewhere near the target area to see the impacts. Feel free to dig into the mission and use it. It should be really obvious what to change to have it fire a rocket every minute instead of every 5 seconds. :) Also, do read this page as a reference and introduction to the Artillery Module in ArmA 2: Artillery Module Edited May 15, 2010 by Killswitch spelling error corrections Share this post Link to post Share on other sites
-D:W- CryHavok 10 Posted July 20, 2009 (edited) wow... thanks killswitch! much appreciated :) edit: I have added this to my mission and its works great! You can find it on our Deviant Wing Server if you want to have a look Edited July 20, 2009 by |D:W| CryHavok Share this post Link to post Share on other sites
furia 10 Posted July 22, 2009 But, it is possible to screip that the AI detect your troops and send a mortar barrage against them? I mean instead preconfiguring "targets", but that an actual AI spotter directs AI arty vs actual enemies. I need this for a coop mission I am working in. Share this post Link to post Share on other sites
onlyrazor 11 Posted April 1, 2010 Guys, I still don't understand one thing: WHAT must I use to make an arty template? Should I put the text in a trigger or something? Share this post Link to post Share on other sites
Evil_Echo 11 Posted April 1, 2010 But, it is possible to screip that the AI detect your troops and send a mortar barrage against them? I mean instead preconfiguring "targets", but that an actual AI spotter directs AI arty vs actual enemies.I need this for a coop mission I am working in. Very possible to do that. I used a FSM that directs a mortar battery to open up on forces detected with a threat level above a given threshold. Calls in the fire missions via the ARTY module ( not using SOM for that ). You could do the same with ordinary scripts. The use of FSM just avoids some loops and sleeps. The effect is very entertaining and quite nasty. Players learn very quickly to keep moving and also to disable the communications relay used by OPFOR to call in those mortar strikes. Share this post Link to post Share on other sites
hstrauss 10 Posted May 9, 2010 hey all, ive been trying to see how this works in my mission but when i Download this mission and load it up the Trucks do not fire at all. Someone help :P Share this post Link to post Share on other sites
mcvittees 0 Posted June 7, 2010 Very possible to do that. I used a FSM that directs a mortar battery to open up on forces detected with a threat level above a given threshold. Calls in the fire missions via the ARTY module ( not using SOM for that ).You could do the same with ordinary scripts. The use of FSM just avoids some loops and sleeps. The effect is very entertaining and quite nasty. Players learn very quickly to keep moving and also to disable the communications relay used by OPFOR to call in those mortar strikes. Well don't be shy, share the code! I for one would like to see how something like that is done!:) Share this post Link to post Share on other sites
stridev 0 Posted June 9, 2010 Agreed, I'd like to know how to do that as well Share this post Link to post Share on other sites
CarlGustaffa 4 Posted June 9, 2010 Awaiting response from Evil_Echo, you could check out Domino. De-pbo and check out bat\AiArty.fsm. It only handles the decision making process. The actual generating process is done in bat\fire_missions.sqf, but doesn't use the vanilla system at all. It handles illumination, coordinated missions, adjustment fire, he, smoke, apicm, and will choose mortars over artillery if appropriate. Not perfect. Decision making regarding artillery was a tiny bit more complex than I first anticipated :p Probably not suited for copy&paste into your own missions, but should be useful how to use fsms as a visual flowchart of how things run. I used to do all this in sqf, but the script just became too messy to keep track of. Share this post Link to post Share on other sites