Jump to content
Sign in to follow this  
headspace

ArmA 2's Artillery Module

Recommended Posts

Make 2-3 MLRS, sync them with arty module. Make a trigger with "on activation":
[group m1, getPosASL a1, ["IMMEDIATE", "HE", 1, 10]] call BIS_ARTY_F_ExecuteTemplateMission;

m1 - leader of mlrs battery; a1 - target unit.

Hello all,

I'm really having a hard time with this. I'm trying to add simple artillery support to a mission without SECOP. I want to be able to click on the map to direct fire from some AI mortars or MLRS. I followed this thread, but it won't do anything. I feel like there's some other things needed to get this to work that I don't know about that maybe everyone else understands already.

Also, by "target unit", do you mean the unit you directs the artillery fire, or the unit you want fired upon?

thanks for your patience and sorry for being a total noob.

Share this post


Link to post
Share on other sites

Hi all,

Headspace I liked the example mission but the constant missions that came up were a bit anoying, but the arti but was what i was looking for. Now I havent done any serious coding since i was at college which was some 8 years ago and even then i was bad at it and had only done some in operation flashpoint in the in game editor. I would like a tutorial on how to call on arti in the game and selecting the location using the map without having additional missions and instant teleport. Can you help?

Share this post


Link to post
Share on other sites
I can't get the sample arty missions working..either of them. I'm finding it very frustrating. I might be doing something really stupid, just not sure.

Here is what i'm doing...

Load either sample mission.... spawn in.. wait for some time, to give to module time to activate.

Go to the radio via the map screen...

If i click on the +1 Artillery Barrage i get a 'ping' noise.

After the 'ping' noise nothing...

Clicking the +1 just gives you an extra arty support. To use that support you need to access it via the communication menu, press 0 > 8. Then select Request Support, then select Artillery Barrage, then what type. So its: 0>8>1>1 then either 1,2 or 3. You can do this either with the map open or not, but obviously, you'll need to open the map to select the target.

===============

Headspace. Thanks for sharing this mate, appreciated.

Share this post


Link to post
Share on other sites

Has anyone gotten the support to work for more than one commander?

I've tried naming each commander and synching them to the same secops module and to different ones but still can't get it to function properly.

Share this post


Link to post
Share on other sites

No SOM method.

(it's still no go on dedicated, works with multiple players on non-dedicated)

First of all, this is my first take on scripting, so it probably can be shorter or easier. Anyway, it works 100%.

Seeing most people struggle with this - simple 11 step tutorial ;)

1) In your mission folder (the one on C drive in Documents\ArmA 2\missions\YourMissionName).

2) Create a text file.

onMapSingleClick "_pos exec ""ArtMarker.sqs"""

3) Paste the code above and rename the file to 'MapClick.sqs'. (Make sure you have enabled extensions in windows, otherwise you'll end up with MapClick.sqs.txt, which won't work).

4) Create another text file.

_Marker = createmarker ["ArtTgt1", _this]
_Marker setMarkerType "Destroy"
_Marker setMarkerColor "ColorRed"
_Marker setMarkertext  "ARTILLERY TARGET"

tgt1 = "Sign_Danger" createVehicle (getMarkerPos "ArtTgt1")

~60

deleteVehicle tgt1

deleteMarker "ArtTgt1"

5) Paste the code and rename to ArtMarker.sqs

6) Once you're done, in the editor, create a trigger. Change 'Activation' to 'Radio Juliet' and 'Repeatedly'.

It will allow you to create new targets every 60 seconds.

[] exec "MapClick.sqs"; hint "Click on the map to select target location.";

7) Put this code into 'On Activation' line.

You can test it in game. Enter map screen, press '0' to bring up radio, then select 'Alpha', click on your own location a warning sign will appear on your location ;) That's what the artillery will fire at, but since we don't have the artillery yet, nor the trigger, you should be safe.

8) Create an artillery you want to use, synchronize the leader with 'Artillery Module'. Name the module 'Art1'.

9) Create another Radio Trigger, this time 'Radio Hotel'.

[Art1, getPosASL tgt1, ["TIMED", "HE", 1, 60]] call BIS_ARTY_F_ExecuteTemplateMission; hint "Bat1: Firing.";

10) Put this code into On Activation field.

11) You can use the artillery in game now!

Remember to first choose 'Radio Alpha' to select a target on the map, then call in 'Radio Hotel' to have the artillery fire. You can have multiple 'Radios' to call in different fire missions.

In the example above, the battery will fire HE rounds, with 1 sec interval over 60 seconds. It can be changed, just edit ["TIMED", "HE", 1, 60] - for reference use wiki http://community.bistudio.com/wiki/Artillery_Module#Creating_fire_missions

Remember it takes a while for the shells to arrive. Also different Artillery types have different min/max ranges. Keep that in mind.

Edited by Volw

Share this post


Link to post
Share on other sites

Thanks Volw! That's just what I needed. Works great, except in the first "on activation" code, there is an extra set of [] at the begining. Took me a while to figure it out and erase them. I am begining to understand...

Share this post


Link to post
Share on other sites

Ok I made my own Arty script. Now I do not know how it does in mp and I am sure it can be made better(you can modify if you want). Make 3 radio triggers set to repeat. name them Artillery 4rnds HE,Artillery 8rnds HE,Artillery 16rnds HE

in the onactivation field put

hint "Left click on map to set target coordinates"; onMapSingleClick """arty"" setMarkerPos _pos; [firebase, _pos, ""arty"",16,gun1] execVM ""dta\scripts\artillery.sqf""; onMapSingleClick """";";

Change the 16 to match the number of rounds you want for each trigger. Note anything other than radio alpha = 4 radio bravo = 8 and radio charlie = 16 you will have to adjust the script. now for the script. I placed it in dta\scripts folder as you can see.

/*script by: Ghost    designed for 3 arty triggers of 4,8,16 rounds setup: create marker type: empty, create 3 radio triggers repeat onact: hint "Left click on map to set target coordinates"; onMapSingleClick """arty"" setMarkerPos _pos; [art module name, _pos, ""marker name"",rounds, art leader name] execVM ""dta\scripts\artillery.sqf""; onMapSingleClick """";";
*/

if (!isServer) exitWith {};

_battery = _this select 0;
_pos = _this select 1;
_marker = _this select 2;
_rnds = _this select 3;
_artleader = _this select 4;

_hetemplate = ["IMMEDIATE", "HE", 0.5, _rnds];

sleep 1;

_marker setmarkertype "mil_destroy";

1 setRadioMsg "NULL";
2 setRadioMsg "NULL";
3 setRadioMsg "NULL";

sleep 2;

// Check to see if position is in range before we fire.
// Second item in _fmTemplate is the ordType (HE, ILLUM, etc)
if ([_battery, _pos, _hetemplate select 1] call BIS_ARTY_F_PosInRange) then
{
[_battery, _pos, _hetemplate] call BIS_ARTY_F_ExecuteTemplateMission;
waitUntil {_battery getVariable "ARTY_ONMISSION"};
_artleader sidechat "Artillery Firing.";

waitUntil {_battery getVariable "ARTY_SPLASH"};
_artleader sidechat "Incoming!";

waitUntil {_battery getVariable "ARTY_COMPLETE"};

sleep 30;

_marker setmarkertype "empty";
1 setRadioMsg "Artillery 4rnds HE";
2 setRadioMsg "Artillery 8rnds HE";
3 setRadioMsg "Artillery 16rnds HE";

_artleader sidechat "Artillery Ready.";
} else
{
_artleader sidechat "Target out of range! Try again.";
_marker setmarkertype "empty";
1 setRadioMsg "Artillery 4rnds HE";
2 setRadioMsg "Artillery 8rnds HE";
3 setRadioMsg "Artillery 16rnds HE";
};

if (true) exitWith {};

Make sure you have your 4 artillery setup linked to artillery module named whatever you put in the trigger call and name one of the artilley men, maybe even setgroupid [""] the leader. Create an empty marker called whatever you called it in the trigger call. and player. If you have problems let me know. It works for me during sp and should work mp, though untested atm.

Share this post


Link to post
Share on other sites

Hi,

I use the Virtual Artillery Sample Mission from the Biki:

There i have 2 Virtual Artillery Modules named "vmlrs1" and "vmlrs2", and a normal Artillery Modul with the follow:

vm = this spawn {waitUntil {_this getVariable "ARTY_INITIALIZED"}; {[_x, "MLRS"] call BIS_ARTY_F_SetVirtualGun;} forEach [vmlrs1, vmlrs2];};

Now, what i have to change to use other Artillery then "MLRS" ?

If i just put "D30" in...it dosent work.

And will the Virtual Artillery Fire at any Range or are there limmits like with real ?

EDIT:

Did i see this right ?

Virtual Artillery has Munition Limits like the Real Weapons (i mean the Virtual MLRS has as much Munition as the Real MLRS) ?

Edited by Wiggum

Share this post


Link to post
Share on other sites

Okay im playing with the 1.02.58134 build.

Headspace's samplemission doesn't work for me. (The nonvirtual)

I get the radiomessages but no explosions, and when watching them they dont fire. If i get into an MLRS and fire it myself it explodes. If i fire without any artymodule attached it works fine.

Mortars seem to be working though.

Is this a bug? Have read that some have had similar experiences.

For someone who is not an software engineer things like this puts you down for real. (30 min in the editor and reading how to set it up, then finally i get the target map up, I fire and the MLRS explodes.. It's like the game is telling me: "You fail so hard". :sad_o:

EDIT: Sorry had a problem with the D30 and the m119 due to a mod. But when fiering the GRAD as with the MLRS I can't change target coordinates and the missiles goes directly north when fired. And thats with no mods.

Edited by Crazyfox

Share this post


Link to post
Share on other sites

I have my arty script which works great for me until i host a session. I the host still can launch the arty no problems, but anyone who connects to me (clients) cannot get the arty to fire. The script runs but this code does not work for them

[_battery, _pos, _hetemplate] call BIS_ARTY_F_ExecuteTemplateMission;

i also tried

[_battery, _pos, _hetemplate] spawn BIS_ARTY_F_ExecuteTemplateMission;

any ideas?

Share this post


Link to post
Share on other sites

***EDIT EDIT EDIT*****

The culprit was VOPsound2.0. I'll leave this here so it doesn't happen again.

Hey guys, I have a problem. (First post, been lurking for a while)

I downloaded the sample Arty module from the biki (The physical one, not the virtual).

The problem is, it doesn't work. It worked before....and I haven't changed anything in the mission. I even re-downloaded it to make sure.... I know how to use it, it's worked before.

Everything appears to work fine. The Secop works, I give them coordinates, and they go through all the motions "shot out" and "splash" come up....but no impacts.

All I did was load up the mission, and hit preview. Nothing was changed. I targeted the small town that you spawn next to. I don't think the rockets are hitting something mid-flight, because when I use the map-click-teleport on the radio to go to the arty, they never fire at all. The rocket modules on the back of the truck turn and elevate properly, as if they were targetting....just no firing. Strange?

I had merged the mission with another I was working on. It even worked fine in that mission. Until yesterday, when playtesting, I noticed the arty wasn't working. After seeing nothing wrong, I went back and tried the demo mission and it wasn't working either. Is there some setting or something I could have changed that would cause this to universally fail?

EDIT: I tinkered a little bit. When I remove the reference to the arty module (Called "RIPPER" in this demo mission) and let the SOM handle everything. (If have read the information correctly, this makes it a "virtual" artillery now, correct?) it works fine. The rounds will drop.

As soon as I add ripper (and the fire mission templates, in this case RIPPER, [1,7,9], it's a MRLS) back into the activation trigger (Triggers in this case. I see there is a second trigger to make it wait for the som module to finish loading) it ceases to function.

This leads me to believe theres a problem somewhere in the arty module, or the MRLSs....I dunno tho....cause this same exact demo mission(The one from the biki) used to work a few days ago....now it doesn't. I'm still new to the ARMA editor...so it's hard to me to tell what exactly could be wrong.

*I'm gonna read through the rest of this thread to see if I can answer my own question. SHoulda done that first...but I was getting frustrated*

Edited by Arak-Nafein

Share this post


Link to post
Share on other sites

For those who are having issues with the MLRS SOM example mission or addMagazine not working. Try this: (Steam users)

1. Delete these files in your addon folder:

editor.pbo

editor.pbo.bi.bisign

modules.pbo

modules.pbo.bi.bisign

2. If you have to run verify integrity of game cache do so now.

3. Restart steam. Steam reload the files.

4. Run A2 and try ARTY again.

This worked for me, but I have not confirmed it for others who have the same issue.

Share this post


Link to post
Share on other sites

Come on guys whats wrong with the MLRS and the GRAD?

Is it a bug or does it work for some of you?

Ive got the 505 version.

Share this post


Link to post
Share on other sites
No SOM method.

(it's still no go on dedicated, works with multiple players on non-dedicated)

First of all, this is my first take on scripting, so it probably can be shorter or easier. Anyway, it works 100%.

Seeing most people struggle with this - simple 11 step tutorial ;)

1) In your mission folder (the one on C drive in Documents\ArmA 2\missions\YourMissionName).

2) Create a text file.

onMapSingleClick "_pos exec ""ArtMarker.sqs"""

3) Paste the code above and rename the file to 'MapClick.sqs'.

4) Create another text file.

_Marker = createmarker ["ArtTgt1", _this]
_Marker setMarkerType "Destroy"
_Marker setMarkerColor "ColorRed"
_Marker setMarkertext  "ARTILLERY TARGET"

tgt1 = "Sign_Danger" createVehicle (getMarkerPos "ArtTgt1")

~60

deleteVehicle tgt1

deleteMarker "ArtTgt1"

5) Paste the code and rename to ArtMarker.sqs

6) Once you're done, in the editor, create a trigger. Change 'Activation' to 'Radio Juliet' and 'Repeatedly'.

It will allow you to create new targets every 60 seconds.

[] exec "MapClick.sqs"; hint "Click on the map to select target location.";

7) Put this code into 'On Activation' line.

You can test it in game. Enter map screen, press '0' to bring up radio, then select 'Alpha', click on your own location a warning sign will appear on your location ;) That's what the artillery will fire at, but since we don't have the artillery yet, nor the trigger, you should be safe.

8) Create an artillery you want to use, synchronize the leader with 'Artillery Module'. Name the module 'Art1'.

9) Create another Radio Trigger, this time 'Radio Hotel'.

[Art1, getPosASL tgt1, ["TIMED", "HE", 1, 60]] call BIS_ARTY_F_ExecuteTemplateMission; hint "Bat1: Firing.";

10) Put this code into On Activation field.

11) You can use the artillery in game now!

Remember to first choose 'Radio Alpha' to select a target on the map, then call in 'Radio Hotel' to have the artillery fire. You can have multiple 'Radios' to call in different fire missions.

In the example above, the battery will fire HE rounds, with 1 sec interval over 60 seconds. It can be changed, just edit ["TIMED", "HE", 1, 60] - for reference use wiki http://community.bistudio.com/wiki/Artillery_Module#Creating_fire_missions

Remember it takes a while for the shells to arrive. Also different Artillery types have different min/max ranges. Keep that in mind.

Sorry, i'm pretty much a total noob when it comes to arma and scripting for it, but i've carefully followed Volw's steps above, and when I enter me mission and click the radio command for selecting the strike position on the map, I get 'Script MapClick.sqs not found'. The script for making the battery fire however, appears to work. Does anyone know what i'm doing wrong?

Ta very much

Share this post


Link to post
Share on other sites
@Volw

Your script does not work for me. I get:

Script MapClick.sqs not found.

I created a different profile than the default so that may be the problem. I dont have anything in the Documents>Arma 2 folder.

My User saved maps are in Documents>Arma 2 other profiles>...

I checked spelling and everything, just wont work.

I also noticed that you say...

but then you say...

I dont see Alpha, just Juliet.

If your maps are under other profiles, then just create those two .sqs files there. They have to be in the same folder as your missions mission.sqm.

What I wrote is correct, just place the files where they're supposed to be and it will work.

Edit: Maybe you have your extensions hidden in windows, so the file name is something like MapClick.sqs.txt ?

Edited by Volw

Share this post


Link to post
Share on other sites

arh yes, checked the full file names, and they were incorrect, sorted now and it works fine.

Thanks very much Volw :D

Share this post


Link to post
Share on other sites

@Volw

Yeah was my file extension hidden. I feel like a dumbass now :rolleyes:

Thanks for your script, I have been playing with it a bit. Good stuff!

Share this post


Link to post
Share on other sites
The culprit was VOPsound2.0. I'll leave this here so it doesn't happen again.

This is why I won't use the VOPSound pack. I hear it breaks things in Single Player too. A SOUND mod shouldn't do that.

Share this post


Link to post
Share on other sites

At risk of embarassing myself here, is there any way to enable scoring/kill tracking for player controlled arty? On the Domination server with airliftable M119s and static mortars, there is a problem with players TKing, which means when there is someone using the arty legitimately they are accused of TKing in the case of any suspicious deaths.

Not that I want credit for all the things I've blown up or anything :)

Share this post


Link to post
Share on other sites

im stuck ive downloaded ArtyDemo MLRS SOM VIRTUAL - By Headspace

and used my radio to activate the arty, gone thru my communication option to put HE raound down on a target the MLRS manuver themselves into position they go thru there firing procedures, but 1~ i dont see no missle come out and neither do i see and splash down on the target area, using the teleport method.

ive looked in the MLRS init file and added this addMagazine "ARTY_12Rnd_227mmHE_M270";

to see if it had any ammo to fire

P.S having the same issue with the M119

please help been P$%^ing me off all day

---------- Post added at 06:56 PM ---------- Previous post was at 06:48 PM ----------

never mind found the issue dam VOP_SOUND

Share this post


Link to post
Share on other sites

n/t

...

Edited by Apocal

Share this post


Link to post
Share on other sites

OK, now I want to let some BM-21 Grad to bomb a town. I need for a destruction effect after my CDF team evacuated some civilians.

So far I stayed near the hints in this thread. I placed 3 BM-21 Grad in the editor + the artillery module which I synchronized to the group leader of the BM-21. The artillery module I named AriLogicName.

I set up a radio trigger (for testing purposes) with this activation line:

[AriLogicName, getPosASL Town1, ["IMMEDIATE", "HE", 1, 10]] call BIS_ARTY_F_ExecuteTemplateMission;

I tried ' instead of the " and I tried double "" - no success.

I tried naming and using the BM-21 groupleader instead of AriLogicName - no success.

I tried Town1 as game logic, as game location, as static object and as civilian car - no success.

I tried re-equiped BM-21 using the init line: removeAllMagazines; this addMagazine "ARTY_40Rnd_120mmHE_BM21; - no success

The BM-21 simply don't want to fire a single missile. They've got missiles onboard, I checked this by my own. What am I doing wrong?

Share this post


Link to post
Share on other sites
No SOM method.

(it's still no go on dedicated, works with multiple players on non-dedicated)

First of all, this is my first take on scripting, so it probably can be shorter or easier. Anyway, it works 100%.

Seeing most people struggle with this - simple 11 step tutorial ;)

1) In your mission folder (the one on C drive in Documents\ArmA 2\missions\YourMissionName).

2) Create a text file.

onMapSingleClick "_pos exec ""ArtMarker.sqs"""

3) Paste the code above and rename the file to 'MapClick.sqs'. (Make sure you have enabled extensions in windows, otherwise you'll end up with MapClick.sqs.txt, which won't work).

4) Create another text file.

_Marker = createmarker ["ArtTgt1", _this]
_Marker setMarkerType "Destroy"
_Marker setMarkerColor "ColorRed"
_Marker setMarkertext  "ARTILLERY TARGET"

tgt1 = "Sign_Danger" createVehicle (getMarkerPos "ArtTgt1")

~60

deleteVehicle tgt1

deleteMarker "ArtTgt1"

5) Paste the code and rename to ArtMarker.sqs

6) Once you're done, in the editor, create a trigger. Change 'Activation' to 'Radio Juliet' and 'Repeatedly'.

It will allow you to create new targets every 60 seconds.

[] exec "MapClick.sqs"; hint "Click on the map to select target location.";

7) Put this code into 'On Activation' line.

You can test it in game. Enter map screen, press '0' to bring up radio, then select 'Alpha', click on your own location a warning sign will appear on your location ;) That's what the artillery will fire at, but since we don't have the artillery yet, nor the trigger, you should be safe.

8) Create an artillery you want to use, synchronize the leader with 'Artillery Module'. Name the module 'Art1'.

9) Create another Radio Trigger, this time 'Radio Hotel'.

[Art1, getPosASL tgt1, ["TIMED", "HE", 1, 60]] call BIS_ARTY_F_ExecuteTemplateMission; hint "Bat1: Firing.";

10) Put this code into On Activation field.

11) You can use the artillery in game now!

Remember to first choose 'Radio Alpha' to select a target on the map, then call in 'Radio Hotel' to have the artillery fire. You can have multiple 'Radios' to call in different fire missions.

In the example above, the battery will fire HE rounds, with 1 sec interval over 60 seconds. It can be changed, just edit ["TIMED", "HE", 1, 60] - for reference use wiki http://community.bistudio.com/wiki/Artillery_Module#Creating_fire_missions

Remember it takes a while for the shells to arrive. Also different Artillery types have different min/max ranges. Keep that in mind.

I followed these steps exactly, but when i go into preview mode in editor it does not work. I call radio juliet, mark the position and then call radio hotel. It displays the message bat1: firing, but nothing happens. Im standing right beside the MRLS I synchronised to the artillery module and it doesnt fire. Helpppp!

Edited by John_P

Share this post


Link to post
Share on other sites
I followed these steps exactly, but when i go into preview mode in editor it does not work. I call radio juliet, mark the position and then call radio hotel. It displays the message bat1: firing, but nothing happens. Im standing right beside the MRLS I synchronised to the artillery module and it doesnt fire. Helpppp!

MLRS has a very large minimum range. Try placing it (much) further away.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×