Jump to content
Sign in to follow this  
headspace

ArmA 2's Artillery Module

Recommended Posts

Also what do the lines mean I guess its simulating Probable Error For Range/Dispersion (Pr, Pd)? It just isnt entirely clear

The lines don't really mean anything, they're there for you to use as guides when looking at the map (for instance, if you want the line of fire to be parallel/perpendicular to something).

Share this post


Link to post
Share on other sites

wot is the simplest way to get AI Artillery to fire at a designated point on the map?....I have read thru all the various posts here about artillery and none of it is making much sense to me!

Where do I put each line of text such as the "[_MyBattery, _targetPos, _heTemplate] call BIS_ARTY_F_ExecuteTemplayeMission;" & _heTemplate = [“IMMEDIATEâ€, “HEâ€, 0, 15]; etc etc!!

Sorry for being a noob!

Edited by frattonstation

Share this post


Link to post
Share on other sites

There is a mission example thread in this forum.

You can simply download the artillery mission there and copy/paste it into your mission.

Sadly the example thread did not get highlited so you have to search for it.

Share this post


Link to post
Share on other sites

Make 2-3 MLRS, sync them with arty module. Make a trigger with "on activation":

Code: [group m1, getPosASL a1, ["IMMEDIATE", "HE", 1, 10]] call BIS_ARTY_F_ExecuteTemplateMission;

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

Do I Synch the Trigger to anything?.

Does the trigger radius incorporate my artillery unit or just the target?

Share this post


Link to post
Share on other sites
@beita: I haven't tried this yet, but wouldn't using the function unit synchronizeObjectsAdd [objects] work? Where objects would be the array of artillery module names you want to sync to the GL?

Yeah, I tried adding the leader of a spawned artillery group to the syncronized objects array, but, looking at how the system is initialized, that isn't going to be enough. Some scripts are run at the mission start that implement the entire artillery system.

I guess I could take a longer look at the init process, but it was pretty confusing to me and I was wondering if anyone else had already figured it out ;)

Code: [group m1, getPosASL a1, ["IMMEDIATE", "HE", 1, 10]] call BIS_ARTY_F_ExecuteTemplateMission;

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

Do I Synch the Trigger to anything?.

Does the trigger radius incorporate my artillery unit or just the target?

Name the artillery module instead of the MLRS group leader. You are supposed to use the module for the call, NOT the group leader. It depends what you want the artillery to DO. If you just want it to be a single barrage, that is different then a group that constantly picks out targets. If you want it to be player controlled, different again.

Also, if you have trouble getting it to work, try using single quotes instead of double quotes. Not sure why it helps, but sometimes it does.

Edited by beita

Share this post


Link to post
Share on other sites

thanks, I just want a single barrage that is AI controlled?

The gunners now seem to be aiming at the target but still not firing!

Edited by frattonstation

Share this post


Link to post
Share on other sites

Actually, it is entirely possible to spawn an Artillery logic and vehicles. But you need to do it in a particular order to ensure that it works.

1. Spawn the group of vehicles.

2. Spawn the artillery logic. (you must use createUnit!)

3. In the very same piece of code as (2), add the synchronization.

The artillery will discover the vehicles when it initializes and you'll be cooking with gas at that point.

Share this post


Link to post
Share on other sites

For those who need it some links:

Detected unit Artillery

Artillery called down by the AI when a blufor is spotted by the opfor in the trigger area.

http://rapidshare.com/files/248240682/ArtyNoSOMDetect.Chernarus.rar

Note this does not feature advanced error handling to deal with the battery being destroyed etc..

Portable Mortars

This script uses those previously released to carry your mortar around with you in a jeep then hop out and rain death down using the targetting system.

http://rapidshare.com/files/248241383/MortarTruck.utes.rar

Share this post


Link to post
Share on other sites
Actually, it is entirely possible to spawn an Artillery logic and vehicles. But you need to do it in a particular order to ensure that it works.

1. Spawn the group of vehicles.

2. Spawn the artillery logic. (you must use createUnit!)

3. In the very same piece of code as (2), add the synchronization.

The artillery will discover the vehicles when it initializes and you'll be cooking with gas at that point.

Awesome!

Thanks.

Share this post


Link to post
Share on other sites
Information on how to make missions using the Artillery Module can now be found on this page.

Enjoy.

I've read through the thread. I'm using it with socom and it's working fine in single player or when I'm hosting. It doesn't work for me on a Dedicated Server.

Also, how could I get it working for the whole team?

I'm quite new to it and was wondering if any of you could give me a hint please.

Share this post


Link to post
Share on other sites

How would I make an enemy AI controlled mortar or artillery unit fire onto a certain point on the map? I don't want to control anything, just have them do their own firing.

Share this post


Link to post
Share on other sites

AzureNight

Place your mortars down, sync the leader to the arty module and call it bigGuns.

Then in your init.sqf

 
nul = [] execVM"myArty.sqf";

In myArty.sqf

sleep 120;

[bigGuns, getPOSASL bObject, ["TIMED", "HE", 0, 15]] call BIS_ARTY_F_ExecuteTemplateMission;

sleep 300;

[bigGuns, getPOSASL aObject, ["TIMED", "HE", 0, 15]] call BIS_ARTY_F_ExecuteTemplateMission;

Where aObject and bObject is some kind of object you've placed on the map at the position you want the fire to come down on.

I've not tested the code but it should work.

---------- Post added at 01:40 PM ---------- Previous post was at 01:32 PM ----------

I've read through the thread. I'm using it with socom and it's working fine in single player or when I'm hosting. It doesn't work for me on a Dedicated Server.

Also, how could I get it working for the whole team?

I'm quite new to it and was wondering if any of you could give me a hint please.

Just tested and mine dosnt work on a dedicated server either. I'd assume it has something to do with the reference to 'player' in the following code.

[["artillery_barrage"], player, [[RIPPER, [1,3,4,7,8,9]]]] call BIS_SOM_addSupportRequestFunc;

Any ideas how to get around that?

Share this post


Link to post
Share on other sites

This thread confuses me. There seems to be missing a decent guide to allowing the same group of artillery, to use different munitions through the artillery support menu. How do i add munition options next to HE in it?

The damned wiki is down.

Share this post


Link to post
Share on other sites

Just tested and mine dosnt work on a dedicated server either. I'd assume it has something to do with the reference to 'player' in the following code.

[["artillery_barrage"], player, [[RIPPER, [1,3,4,7,8,9]]]] call BIS_SOM_addSupportRequestFunc;

Any ideas how to get around that?

Actually I did some digging and it seems like SOM is not working on Dedicated Servers atm. So we'd need a solution that is not SOM dependant.

Share this post


Link to post
Share on other sites
This thread confuses me. There seems to be missing a decent guide to allowing the same group of artillery, to use different munitions through the artillery support menu. How do i add munition options next to HE in it?

The damned wiki is down.

When you add a support request

[["artillery_barrage"], player, [[RIPPER, [1,3,4,7,8,9]]]] call BIS_SOM_addSupportRequestFunc;

The numbers in square brackets are the type of missions fired, the missions define the type of muniton used. The wiki details what these mean. The 105 can fire 1,2,3,4,5,6,7,8,9.

If you are actually making your own fire mission then you can chose timed/immediate muniton no.rounds/how long etc...

Share this post


Link to post
Share on other sites

Wiki still aint up. Could anyone tell me which munitions the mortar could use, and what their IDs are?

Share this post


Link to post
Share on other sites
AzureNight

Place your mortars down, sync the leader to the arty module and call it bigGuns.

Then in your init.sqf

 
nul = [] execVM"myArty.sqf";

In myArty.sqf

sleep 120;

[bigGuns, getPOSASL bObject, ["TIMED", "HE", 0, 15]] call BIS_ARTY_F_ExecuteTemplateMission;

sleep 300;

[bigGuns, getPOSASL aObject, ["TIMED", "HE", 0, 15]] call BIS_ARTY_F_ExecuteTemplateMission;

Where aObject and bObject is some kind of object you've placed on the map at the position you want the fire to come down on.

I've not tested the code but it should work.

---------- Post added at 01:40 PM ---------- Previous post was at 01:32 PM ----------

Just tested and mine dosnt work on a dedicated server either. I'd assume it has something to do with the reference to 'player' in the following code.

[["artillery_barrage"], player, [[RIPPER, [1,3,4,7,8,9]]]] call BIS_SOM_addSupportRequestFunc;

Any ideas how to get around that?

It didn't work. I don't get it, what am I supposed to have in my init.sqf? Just that one line?

Share this post


Link to post
Share on other sites
Make a player unit

Make the SOM Game Logic Unit, synch that to the player

Make a trigger that's activated by Radio Alpha and set to be repeatable (if you want multiple strikes available), then in the on activation field of the trigger put in:

[["artillery_barrage"], player, [[]]] call BIS_SOM_addSupportRequestFunc;

Then when you want the artillery, go to the map and trigger radio alpha, then use the communication commands to contact SecOps and request the support

Hi

That works great but could you tell me how to make the same but not for virtual artillery. I want to make artillery MLRS do the same as in your explanation please.

Thanks

Rob

Share this post


Link to post
Share on other sites

One more thing I've noticed LASER rounds don't seem to work when called by this nice code by beita: [group m1, getPosASL a1, ["IMMEDIATE", "LASER", 15, 4]] call BIS_ARTY_F_ExecuteTemplateMission;

Rounds drop on target, not on a lased target. (all other types are working fine)

They work fine when used with SOM. Is there a trick to make it work without it?

Share this post


Link to post
Share on other sites

Volw: That code is incorrect; it doesn't reference the Artillery Logic. That may have something to do with it.

Also make sure you're dropping fairly close to the target.

Share this post


Link to post
Share on other sites
Volw: That code is incorrect; it doesn't reference the Artillery Logic. That may have something to do with it.

Also make sure you're dropping fairly close to the target.

Well, it works on every other shell ... strangely, even on SADARM rounds.

EDIT: Even if used with Arty Logic instead of the grp leader, it's still hitting the target set, instead of the target lased.

EDIT2: Right, my mistake. The problem was - I was trying to lase the target as BLUEFOR, using REDFOR arty. (My test island is utes, arty is off map so I didn't really notice :o).

Edited by Volw

Share this post


Link to post
Share on other sites

I'm having trouble with a basic fire mission script.

_myBattery = this select 0
_Target = this select 1
_heTemplate = ["IMMEDIATE", "HE", 0, 15]

if {[_myBattery, getPosASL _Target, _heTemplate select 1] call BIS_ARTY_F_PosInRange} then
{
    [_myBattery, getPosASL _Target, _heTemplate] call BIS_ARTY_F_ExecuteTemplateMission;
} else
{
    hint "Target out of range!";

then a radio alpha trigger containing

[RIPPER, tg1_1] exec "mf.sqs"

I've tried to target a trigger, marker and now is targeting a rifleman. Every time I try to fire it comes back as out of range. I initially set it up as

_myBattery = this select 0
_Target = getPosASL "tg_1"
_heTemplate = ["IMMEDIATE", "HE", 0, 15]

and tried getMarkerPos with a marker nothing seems to work

I've tested the ranges by using the SecOps artillery support via the same battery which works like a charm. I want artillery support called in when I execute the script and not have to target it myself. I plan on creating a random artillery strike script for future missions so the enemy will randomly fire on targets throughout the course of the mission until the element is taken out but I can't get the simple script to work.

I'm sure its something simple that I'm just not seeing any help would be appreciated.:)

Edit:

[group mt_1, getMarkerPos MarkOne, ["IMMEDIATE", "HE", 0, 15]] call BIS_ARTY_F_ExecuteTemplateMission

seems to do the trick instead of referencing the arty module like in secOps. mt_1 is the group leader for the mortar team

Edited by Daskidd821
Fixed

Share this post


Link to post
Share on other sites

So the big question is: How to get it to work in MP with SOM. Ive got the same thing. They aim but do not fire, and when I get in one of the guns they have no ammo in.

I have this in the init section

this addmagazine "ARTY_30Rnd_105mmHE_M119"; this addmagazine "ARTY_30Rnd_105mmWP_M119"; this addmagazine "ARTY_30Rnd_105mmSADARM_M119"; this addMagazine "ARTY_30Rnd_105mmSMOKE_M119"

Its really odd. Any ideas on a work around?

Share this post


Link to post
Share on other sites

SOM doesn't work on dedicated servers atm.

Share this post


Link to post
Share on other sites

After reading through the thread I've still no answer to my problem:

Setup D-30 artillery using the wiki and the example missions as a guide to see how everything works together. Got them to fire through the SECOP manager, yet no explosions.

They correctly point and shoot, I get radio messages saying: "Shot" as well as "Splash" from both HQ and the Player. But no explosions on the target location.

I tried standing pretty close to the target zone so it's not a graphical error. I hear no explosion sound nor is anything destroyed/killed.

Any suggestions?

EDIT: I've just put a pair of GRADs up to fire at anything entering a Trigger zone, they work fine on my map.

EDIT 2: Okay seems moving the artillery has fixed the problem. Odd since I made sure to give the arty a clear line of fire so that the shells did not hit anything. I had placed the artillery up on the hill where base Manhattan was in the SP campaign. Perhaps it hit the top of the world? :P

Edited by Tarrok

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  

×