Jump to content
Sign in to follow this  
headspace

ArmA 2's Artillery Module

Recommended Posts

Oki, Having difficulty getting the M119s to fire.

I have a group of 3 m252 81 mortars, synced to an Arty module (leader of the mortar group), Arty module is named m1

Target is named MarkOne (its not a marker, tis an enemy unit)

//Edit

I have a trigger that is grouped with an officer unit stood next to the mortar battery. The trigger is moved to logic mlog2 and after 40 seconds is moved back to mlog1, position of the officer, which activates the trigger again and the battery fires at the same location again.

Arty.sqs

if( isServer )then
{
~10
[m1, getPosASL MarkOne, ["IMMEDIATE", "HE", 1, 10]] call BIS_ARTY_F_ExecuteTemplateMission;
~5
atrig1 setpos getpos mlog2;
~40
atrig1 setpos getpos mlog1;
}
else exitwith {};

exit

Works fine. The battery will fire on its own and will continue to fire without intervention and will continue to do so unless (a) it is destroyed (b) runs out of ammo. with the ammo trucks present, am not sure how this would turn out.

However, If I unsync the artillery module from the mortars and sync it instead to an identical group of M119s' (group of 3) - Moving all the necessary logics and what not involved. Nothing Happens. Do the M119s need anything special done to them in order to get them to fire in the same way? :confused:

Any help would be greatly appreciated - many thanks

Example Mission - http://rapidshare.com/files/323599389/arty_test.utes.rar.html

This is an example of 2 mortar batteries that will automatically and continuously fire on the same position per battery. The same is not possible with an M119 battery and I can't figure out why.

/Edit - Range! Seems the m119 has as long a range as the MLRS

I have loaded a new example below that comes with an .SQF file called arty. All you need to do is create a battery, sync it with an Arty logic, name the logic whatever you want. Create an object (enemy soldier, static weapon, vehicle, whatever), name it whatever you want.

The content of Arty.sqf:

if ( isServer ) then 
{
_battery = _this select 0;
_target = _this select 1;

_targetPos = getPosASL _target;
_heTemplate = ["IMMEDIATE", "HE", 0, 10];

[_battery, false] call BIS_Arty_F_SetShellSpawn;

if ([_battery, _targetPos, _heTemplate select 1] call BIS_ARTY_F_PosInRange) then 
{
	[_battery, _targetPos, _heTemplate] call BIS_ARTY_F_ExecuteTemplateMission;
} else 
{
	Hint "Target out of Range!";
};
} 
exitWith {};

Create a trigger and for testing purposes set the activation to radio alpha. Then, in the onActivation field of the trigger call Arty.sqf file with the following:

null = [name of your battery, name of target] execVM "arty.sqf";

The sqf uses non-spawn mode when firing its rounds.

If your target is to far away or too close, you should get a hint message to let you know you battery is out of range.

Example using Arty.sqf - http://rapidshare.com/files/325466068/Chen_arty_test.Chernarus.rar

This doesn't use the SOM Module, is okie for locally hosted server, not sure on dedicated. If someone can test and post here, that'd be great!

Edited by Ronin =ASP=
Fixed: Problem was minimum range for the m119

Share this post


Link to post
Share on other sites

Refering to this this and this I'll ask again... :)

Is it possible at all to change this line...?

[["-->artillery_barrage<--"], player, [[RIPPER, [7,8,9]]]] call BIS_SOM_addSupportRequestFunc;

Share this post


Link to post
Share on other sites

how can i detect if the artillery module is running or not?

like i want something like

while {alive _unit} do

{

if (BIS_ARTY_INIT) then { start my code };

sleep 2;

};

Share this post


Link to post
Share on other sites

Ok, I want to have a spawnable group of MLRS, linked to the player by High Command. (not a problem) But then have that group be accessible via the SOM module. So ...

In mission editor I sync player with SOM

In a script I...

- create group of MLRS

- createUnit arty module

- synchronize group leader with arty module

- call BIS_ARTY_F_initVehicle for each MLRS (< would help to know exactly what this does)

- then have BIS_SOM_addSupportRequestFunc with logic name via radio

Result : I have radio go but nothing in communications menu after request artillery

The real problem is I don't know if this would be the proper way to do it, has anyone tried this out? It probably has to do with getting the initialization right, so any suggestions for that?

**Edit**

Ok just a few minor errors and I got it to work great, however when I move the MLRS away from a firing position they get deleted... any ideas?

**Edit**

Works like a charm now, had a glitch with the garbage module causing deletion.

Edited by Draper

Share this post


Link to post
Share on other sites

OK I need help with this...I have tried reading through ALL of this thread and other threads AND the BIKI and STILL cannot get this damn module to work!

For the first time ever I am starting to have empathy for the crazy German Kid...maybe he was actually trying to use the BiS Artillery module too!

Here is the really basic and simple request that I have. I want Blufor to walk into a Trigger area and a nearby enemy Artillery unit starts to open fire for a set period of rounds. I want this set to a repeating trigger and figured that having created an artillery module logic and called it 'bat1' that if I used the following placed into the Trigger on activation field it would work:

[Art1, getPosASL test, ['IMMEDIATE', 'HE', 0.5, 15]] call BIS_ARTY_F_ExecuteTemplateMission;

Ha! silly me.... of course it does not work...nothing in ArmA is ever that simple!

I read through the Biki over and over and over again and if you have no scripting knowledge or programming skills, much of it would be easier to read in Egyptian Hieroglyphics!! The reason or this is the fact that often these biki entries are written by people who fully understand programming that you need this logic and that link...for a command to be given here and a piece to be insterted into the init...etc etc etc....but many of us simply do not have that understanding of how that works.

So...This is for Multiplayer....I dont want to give anyone a radio command or a control module.....I simply want them to walk into an area and encounter a barrage of artillery!! Preferably with the rounds spread at random over a wide area in the trigger! I have used a script to do this before....but surely the whole point of these fancy modules is for your Ape Fisted mission maker like myself to simply go 'Place.....synchronise...name... set a trigger area and bang.....instant hard hat zone!!!'

So... is there a simple demo mission currently where AI manning an artillery battery can fire artillery shells into a given target, over a random space area, repeatedly if Blufor enters?

Nothing more.....nothing less...no fancy elevations.... trajectories.... or dead cow launching...bog standard simple artillery. Whoever is desgning these modules for BIS truly needs to simplify this whole process otherwise what is the point, if over and over again people have to ask the techies...how to do what should be a very simple task?

Keep It Simple Stupid!!

I would ask that anyone writing anything on the Biki, considers anyone that reads it to be a complete 'numpty' ... i.e. "OK in order to get started we need to place some artillery on the map and make sure they are grouped to one that is the leader. Now place an Artillery logic...in the properties of the logic you will find various boxes... ETC, ETC ETC"...

Basically hold someones hand through the whole process...that way the person reading actually learns as they read, rather than read, read again....read for a thrid time..pull some hair out..... read again.... kick the cat....read again..... then end up looking like that fat German kid shown above...!

Many thanks for all help, time and consideration shown to this problem!!! :D

EDIT - Ahhhhhhhhhhhhh never mind..... I have done all I needed to do with TCP's script! :D

Edited by BD1

Share this post


Link to post
Share on other sites
OK I need help with this...I have tried reading through ALL of this thread and other threads AND the BIKI and STILL cannot get this damn module to work!

For the first time ever I am starting to have empathy for the crazy German Kid...maybe he was actually trying to use the BiS Artillery module too!

Here is the really basic and simple request that I have. I want Blufor to walk into a Trigger area and a nearby enemy Artillery unit starts to open fire for a set period of rounds. I want this set to a repeating trigger and figured that having created an artillery module logic and called it 'bat1' that if I used the following placed into the Trigger on activation field it would work:

[Art1, getPosASL test, ['IMMEDIATE', 'HE', 0.5, 15]] call BIS_ARTY_F_ExecuteTemplateMission;

Ha! silly me.... of course it does not work...nothing in ArmA is ever that simple!

I read through the Biki over and over and over again and if you have no scripting knowledge or programming skills, much of it would be easier to read in Egyptian Hieroglyphics!! The reason or this is the fact that often these biki entries are written by people who fully understand programming that you need this logic and that link...for a command to be given here and a piece to be insterted into the init...etc etc etc....but many of us simply do not have that understanding of how that works.

So...This is for Multiplayer....I dont want to give anyone a radio command or a control module.....I simply want them to walk into an area and encounter a barrage of artillery!! Preferably with the rounds spread at random over a wide area in the trigger! I have used a script to do this before....but surely the whole point of these fancy modules is for your Ape Fisted mission maker like myself to simply go 'Place.....synchronise...name... set a trigger area and bang.....instant hard hat zone!!!'

So... is there a simple demo mission currently where AI manning an artillery battery can fire artillery shells into a given target, over a random space area, repeatedly if Blufor enters?

Nothing more.....nothing less...no fancy elevations.... trajectories.... or dead cow launching...bog standard simple artillery. Whoever is desgning these modules for BIS truly needs to simplify this whole process otherwise what is the point, if over and over again people have to ask the techies...how to do what should be a very simple task?

Keep It Simple Stupid!!

I would ask that anyone writing anything on the Biki, considers anyone that reads it to be a complete 'numpty' ... i.e. "OK in order to get started we need to place some artillery on the map and make sure they are grouped to one that is the leader. Now place an Artillery logic...in the properties of the logic you will find various boxes... ETC, ETC ETC"...

Basically hold someones hand through the whole process...that way the person reading actually learns as they read, rather than read, read again....read for a thrid time..pull some hair out..... read again.... kick the cat....read again..... then end up looking like that fat German kid shown above...!

Many thanks for all help, time and consideration shown to this problem!!! :D

EDIT - Ahhhhhhhhhhhhh never mind..... I have done all I needed to do with TCP's script! :D

If you still want to know where you made a mistake.

You did not correctly use the given editor name for the module in the function call.

Art1!=bat1

Share this post


Link to post
Share on other sites

Can someone please test this mission.

I am quite certain that the BM-21 Grad has been rendered incapable of

firing in conjunction with the artillery module with the introduction of patch 1.05.

All my missions that worked fine with the Grad BEFORE patch 1.05, now don`t work anymore.

When the module is synced to the group, also it is not possible to be the gunner

of the BM-21, because the turret won`t respond to user input and also the gunner position is totally off.

A bug ticket related to the gunner view issue has been created on dev-heaven : http://dev-heaven.net/issues/8084

But the fact that the Grad won`t fire at all is not listed in the issues yet.

The MRLS works fine in the same position and no gunner problem either with that.

However i can`t believe that no-one has been experiencing such a bug, that`s why i put this to an open replication test before i create a ticket about it.

So it would be nice, if someone could replicate this.

Here the mission:

GRADHE_Test.Chernarus.rar

Share this post


Link to post
Share on other sites

I've had problem with the grad in 1.05 as well. Other artillery pieces do work fine though.

Share this post


Link to post
Share on other sites

Question: Is there some way to use a trigger and the arty module to spawn shells from a simulated fire mission at the position of either the trigger or a named unit somewhere on the map? As it stands, every time I want to simulate the enemy using artillery on my position, I have to sync up an actual battery to the module and have it physically fire on my position. If there are too many groups on the map, then the battery seems to have trouble firing.

Thanks in advance.

Share this post


Link to post
Share on other sites

Okay for some reason, the m119 or whatever the cannon is called, fires straight forward? It doesn't actually aim at the target, even though it works for the MLRS?

Share this post


Link to post
Share on other sites

I made a rather simple artillery script that relies on UPSMON to take positions of enemies (pre-defined as viable artillery targets as it was easier for me to make the script this way). The script basically calls fire missions on most up to date UPSMON positions out of the pre-defined list of enemies. The script works most of the time on both single player and on a dedicated server, but last time I played the mission I got this error on the dedicated server (obviously no errors on client):

Error in expression <xAzimuthChange];
};
sleep _rotationTime + 5;


if (BIS_ARTY_DEBUG==1) then
{
tex>
 Error position: <+ 5;


if (BIS_ARTY_DEBUG==1) then
{
tex>
 Error +: Type Nothing, expected Number,Array,String

The units were also clearly above the minimum range and below the maximum range of the mortars, and I had a check to prevent trying to shoot at an impossible to hit target anyway. The only enemy the mortars might have seen were the helicopters and even that is not likely.

The mission using the script:

http://www.filefactory.com/file/b14d17d/n/ace_co_16_prisonner_rescue_b3.chernarus.pbo

Another, simpler mission using the script (but is on Razani CAA1 and uses an older version of UPSMON that is modified in the same way):

http://www.filefactory.com/file/b14d1ah/n/ace_co_04_snipercopter_beta1.razani.pbo

Please don't publish those missions as they are still unfinished (especially with this weird error), but feel free to do whatever you want with them for personal use.

Apparently _rotationTime has an invalid value, so it would seem like the arty script is getting called with an invalid parameter, but if I was calling it with an invalid parameter shouldn't it have given an error every time? All except one time I played this mission I got no errors whatsoever.

Any help would be much appreciated.

Share this post


Link to post
Share on other sites

Is it possible to speed up the time between calling in a fire mission and the first salvo actually hitting the aimpoint?

I want to call in quick fire missions on pre-defined spots on the map. It should not take more than 30 seconds - less is even better - from calling the mission until the first salvo hits the aimpoint.

Share this post


Link to post
Share on other sites

As far as I can tell the artillery module's fire missions take very very little time from the moment you call the function until the first round is fired. Most of the time you wait is the shell's flight time.

Share this post


Link to post
Share on other sites

Yes, the waiting time is relatively small. I'm looking for a way to reduce it even more.

Share this post


Link to post
Share on other sites

Ok I'm having issues with arty now using scripts I know worked before.

I can place 3 mortars on the map, sync them to the arty module and use them no problem. If I change them to m119s (or virtual pieces) then they just won't fire and I know it's not a range issue.

Share this post


Link to post
Share on other sites

M119's have limited traverse and a minimum range. Have you checked the condition states of the fire mission to see if that is the problem?

Share this post


Link to post
Share on other sites

I would imagine they have exact same min and max range that the unit they simulate has.

Share this post


Link to post
Share on other sites

Sorry everybody:

In the page http://community.bistudio.com/wiki/Artillery_Module

They said "BIS_ARTY_F_ExecuteTemplateMission" doesn't work in a singleplayer mission. Is that true? I failed to use BIS_ARTY_F_ExecuteTemplateMission in my single mission...

So, I have some questions:

1st:

How do I create an easier artillery fire without SOM, without control of player?

I know I can use {"SH_125_HE" createVehicle ...}, but this can't return a killer in Eventhandler "killed".

2nd:

If I use SOM, use [["artillery_barrage"], player, [[RIPPER, [1,7,9]]], [true]] call BIS_SOM_addSupportRequestFunc;.

How can set a 20 rounds "Immediate suppression"-- It just fire 10 rounds.

So.. maybe I should extract the .pbo of SOM? But I can't find it yet...

PS: sorry for my english...

Share this post


Link to post
Share on other sites

Your English is just fine.

You don't need SOM for artillery at all. It just gives you a nice interface to human players to pick the target location and some pre-packaged fire missions. Using just the ARTY module along with your own driver script(s) for fire missions works great and gives you a great deal more control over your battery operations. I've posted a short script for doing scripted fire-missions here and on armaholic, a number of people have used it.

My cannon and mortars fire during testing via the editor - which is quite similar to single-player. So believe the wiki's warning is more related to SOM than ARTY.

There is a function, documented on the wiki page you cited, for detecting incoming shells. That call includes data on the originating battery which could be used to back-track to the player ordering the fire mission if you are willing to do a little book-keeping.

Share this post


Link to post
Share on other sites

Ah... Sorry, maybe I don't understand what is your mean exactly...

I saw several ATRY scripts in amraholic but don't know which one is yours. It seems that your script is the one in which AI gunner aim to a direction following player? Or the "Advanced Artillery Request System"??

And I don't know which function you refer to ,"for detecting incoming shells".

Share this post


Link to post
Share on other sites

OK! Excellent!! I have try this scripts, Real cool!!

And I will join you to my thanks list when I release my mission with your scripts.

However, there are still a question:

When I use EventHandler kill. The killer is still "null-Object". Can't return the killer. How can I know it is my ARTY who kill the enemies? Did you mean that "incoming shells" can solve this problem in some way? Return of killer is what I want, that's the most important reason why I want a real artillery.

Edited by Dragon Zen

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  

×