PDA

View Full Version : ArmA 2's Artillery Module



Pages : [1] 2

Headspace
May 29 2009, 22:37
Information on how to make missions using the Artillery Module can now be found on this page. (http://community.bistudio.com/wiki/Artillery_Module)

Enjoy.

DaveP
Jun 1 2009, 21:39
So here's the scoop:

I'm trying to set up a direct fire mission, and have a script put together as follows


_myBattery = _this select 0
_targetUnit = _this select 1


_WPBarrage = [“IMMEDIATE”, “WP”, 1, 10];

_targetPos = getPosASL _targetUnit;


[_myBattery, _targetPos, _WPBarrage] call BIS_ARTY_F_ExecuteTemplateMission;


hint format ["%1, %2, %3",_Targetpos, _myBattery, _targetUnit]

Exit


In game I have a vehicle that I am using as the target referenced _targetUnit
An artillery game logic referenced _myBattery, which is synched to the group leader of four US mortars with the WP magazine added

and the whole thing is triggered by a radio trigger.

And it doesn't work :confused:

Any ideas? It's my first script since the old OFP days so things may be rusty

EDIT: On top of that, if I use the line:
[["artillery_barrage"], player, [[_myBattery, [3]]]] call BIS_SOM_addSupportRequestFunc;

(where _myBattery references the leader of the mortar team, not the game logic) (tried that and it didn't work), it tells me the location is outside the firing envelope no matter where I click on the map.

Headspace
Jun 1 2009, 21:52
DaveP: The script looks fine but your target may not be in range. How far away is it?

EDIT: You need to reference the Artillery Module game logic.

DaveP
Jun 1 2009, 21:58
DaveP: The script looks fine but your target may not be in range. How far away is it?


I've tried within 500m, I've tried a km away; I've tried distances that the system lets me target using the manual aiming system, but for some reason the AI is playing dumb on it.


(Of course, all this said, the Game logic system is a great idea and the effects are great, especially for the WP rounds)

EDIT: It seems the only solace I have is using the virtual artillery system generated by SOM

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

It works perfectly. Not exactly what I'm after, though.

Headspace
Jun 1 2009, 22:14
(where _myBattery references the leader of the mortar team, not the game logic)

Just noticed this. You have to reference the Artillery Module game logic.

Try this, too:


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

That will let you use the SOM method with your battery.

EgWal
Jun 1 2009, 22:25
Could somebody please post a simple mission with arty that can be opened in the editor. Despite the documentation Im unable to get it to work.

Cougar
Jun 1 2009, 22:44
Could somebody please post a simple mission with arty that can be opened in the editor. Despite the documentation Im unable to get it to work.

I 2nd that :S

DaveP
Jun 1 2009, 22:48
Just noticed this. You have to reference the Artillery Module game logic.


Aye, I had it referencing the game logic in the script originally; I just need to remember to use different names for stuff when I'm using it in different places, lazy me :rolleyes:

petteerr
Jun 1 2009, 23:19
Headspace,

Could you please post a mission showing us how to use at least virtual artillery?I have tried to use it as your tutorial but i cant make it!

DaveP
Jun 1 2009, 23:31
Headspace,

Could you please post a mission showing us how to use at least virtual artillery?I have tried to use it as your tutorial but i cant make it!

Using Virtual Artillery through SOM is easy, just make a trigger with a few seconds to activate (to make sure it activates after the SOM package) and then on activation put in:

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

Then just set up SecOps the usual way (make the Secondary Ops GL, then sync it to the player)

and that's it! Contact SecOps and you'll have one artillery strike available

warpuppy
Jun 1 2009, 23:49
@<hidden> P

Hi Mate can you explain a little more in detail please mate

Many thanks in advance

DaveP
Jun 2 2009, 00:13
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

petteerr
Jun 2 2009, 00:31
DaveP,
Thanks for the info,for me it worked,but it would be very usefull if sometime we could have a mission(tutorial) with virtual and real artillery explained!!! i was wondering can AI have artillery support? :)

DaveP
Jun 2 2009, 01:23
DaveP,
Thanks for the info,for me it worked,but it would be very usefull if sometime we could have a mission(tutorial) with virtual and real artillery explained!!! i was wondering can AI have artillery support? :)

You could set up triggered fire missions, I think the counterattack sp mission does this; as to them using it on the fly, I believe there was a script package for Arma or OFP that simulated this, can't remember.

warpuppy
Jun 2 2009, 02:11
@<hidden>

Many thanks for that mate most appreciated!

Man this just gets better and better every minute

EiZei_
Jun 2 2009, 11:22
Couple of questions:

Has anyone managed to make the arty module work with rocket launcher artillery yet? I tried replacing the ammo but Grads and MLRSses won't even budge when I try to initiate a fire mission. Mortars work just fine.

Is there a way to add more dispersion besides fudging up the target coordinates themselves?

DaveP
Jun 2 2009, 11:24
Couple of questions:

Has anyone managed to make the arty module work with rocket launcher artillery yet? I tried replacing the ammo but Grads and MLRSses won't even budge when I try to initiate a fire mission. Mortars work just fine.


Main thing I've noticed about the rocket launchers is they have a really long minimum range, could be why.


I tried rewriting my script again today, no dice yet again :confused:

Headspace
Jun 2 2009, 16:26
Some demo missions are now located at http://community.bistudio.com/wiki/Artillery_Module#Example_Missions. This should answer (most) of the questions that have come up, and are within the scope of the biki documentation.

mr.g-c
Jun 2 2009, 16:29
Some demo missions are now located at http://community.bistudio.com/wiki/Artillery_Module#Example_Missions. This should answer (most) of the questions that have come up, and are within the scope of the biki documentation.
Excellent Work!
So, you think BIS Arty is "close" to CoC Unified Artillery?
Do you think i can be modified in future?
thanks!

Binkowski
Jun 2 2009, 16:35
Thanks Headspace! And yes, I have to agree mr.g-c this reminds me of CoC Unified Artillery. Pretty similar with radio commands etc etc.

Headspace
Jun 2 2009, 16:41
So, you think BIS Arty is "close" to CoC Unified Artillery?

That's a loaded question...no pun intended. But I'm not sure what you mean by "close." Obviously the Artillery Module was meant to be different than CoC:UA in many aspects. While I am sure it shares some features by virtue of being about the same thing, there are bound to be major differences.

Keep in mind also that I haven't actually ever played CoC:UA.

DaveP
Jun 2 2009, 17:38
That's a loaded question...no pun intended. But I'm not sure what you mean by "close." Obviously the Artillery Module was meant to be different than CoC:UA in many aspects. While I am sure it shares some features by virtue of being about the same thing, there are bound to be major differences.

Keep in mind also that I haven't actually ever played CoC:UA.


The major similarities are due to a mix of the strive for realism, and the complexities involved.

Both systems use similar radio commands, as I assume that this is the standard parlance for requesting this form of fire support

Both systems have the same ammo available, as these are the most common forms of artillery support

Both systems have similar Artillery Pieces available, because an MLRS is kickin rad :rolleyes:

Both systems require a short period before engaging firing with physical artillery, because it's not that easy to calculate it all that quickly.



This system most definitely improves upon it though, mainly with the player controlled aim system; that's going to be bloody great for PVE/PVP Tac Coop Groups

schaefsky
Jun 3 2009, 14:07
Has anybody figured out how to setup AI controlled ARTY without the SOM?
If so, could that someone post a simple example missions?
I am unable to get it to work, and the examples in the biki use SOM, too. This actually works fine, it is just not what I want to have.
On the other hand, is there a way to disable the SecOps in the SOM so one would just have the support options available?
Thanks.

MiXeR
Jun 3 2009, 18:00
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.

Mission Type: “IMMEDIATE” or “TIMED”
The IMMEDIATE mission type will complete after a requested number of rounds have been fired.
The TIMED mission type will complete after a specific number of seconds have elapsed.
Ordnance Type: This is a string indicating the general type of ordnance to fire. Ordnance types are defined either by default or by calling the BIS_ARTY_F_AddOrdnanceType function. For each type of artillery, there are one or more ordnance types. Common default ordnance types include:
“HE” - High Explosive
“WP” - White Phosphorous (“Willie Pete”)
“SADARM” - Search and Destroy Armor
“LASER” - Laser guided artillery shell
“ILLUM” - Flares
“SMOKE” - Non-Incendiary Smoke
Rate of Fire: The delay, in seconds, between each shot. This delay will be applied globally throughout the entire battery. For example, if gun 1 fires, there will be a delay between that event and when gun 2 fires (and so on).
Duration of Mission OR Round Count: This depends on the mission type. This value is used as follows:
For IMMEDIATE missions, the number of rounds to fire.
For TIMED missions, the number of seconds to sustain fire.


PS: I have a problems with GRAD, it crew geting damage after fire, and get out from arty. I placed it in many directions, but crew are still dying
PSS: Sorry for my english. :)

schaefsky
Jun 3 2009, 21:10
Well, thank you very much, Mixer!!!
I have attached a sample mission to my last post in this toipic at OFPEC:
http://www.ofpec.com/forum/index.php?topic=33437.0
My problem was that I tried to use the arty-module itself and the lead unit as the first variable, but not the group.
I think the biki documentation is unclear about this (or maybe I am unable to read it the right way).

beita
Jun 3 2009, 22:25
Is there any way to have multiple "Artillery Barrages" available at once?

Say I want an 81mm mortar, 105mm howitzer, and MLRS artillery barrage to be selectable.

Possible?

DaveP
Jun 3 2009, 22:29
Is there any way to have multiple "Artillery Barrages" available at once?

Say I want an 81mm mortar, 105mm howitzer, and MLRS artillery barrage to be selectable.

Possible?

I assume if multiple are available it will just choose the most feasible depending on ammo type and the like, give it a try!

Headspace
Jun 3 2009, 22:29
Just to be clear the arty module is your battery variable. Even if you used another method and it worked, the right way to do it is to use the arty module. Any other method is unsupported.


Is there any way to have multiple "Artillery Barrages" available at once?

Say I want an 81mm mortar, 105mm howitzer, and MLRS artillery barrage to be selectable.

Possible?

Yes, add multiple support requests (using the different artilleries) with SOM should work, or you could manually do it by calling fire missions through the mechanism of your choice.


I assume if multiple are available it will just choose the most feasible depending on ammo type and the like, give it a try!

The module will load the appropriate ammo if it's defined for its type, however you need to specify the battery explicitly. There's currently no mechanism native to the Artillery Module to select a battery on the fly, although such a thing would be pretty easy to script.

beita
Jun 3 2009, 22:55
So, this is what I am doing to add multiple requests, tried it two ways:



[['artillery_barrage'], player, [[batt81, [1,4,7,9]], [batt81b, [1,4,7,9]], [batt105, [1,4,7,9]]]] call BIS_SOM_addSupportRequestFunc;


and



[['artillery_barrage'], player, [[batt81, [1,4,7,9]]]] call BIS_SOM_addSupportRequestFunc; [['artillery_barrage'], player, [[batt81b, [1,4,7,9]]]] call BIS_SOM_addSupportRequestFunc; [['artillery_barrage'], player, [[batt105, [1,4,7,9]]]] call BIS_SOM_addSupportRequestFunc;


Only get 1 Artillery Barrage option in the Communication menu. For the first method, it is the 81mm mortars battery, for the second method, it is the M119 battery.

Headspace
Jun 3 2009, 23:05
beita: SOM is going to serve them one at a time. I'm not in a position where I can test this directly, but try requesting artillery twice after you do the second one and see what happens.

The first method isn't going to work.

schaefsky
Jun 3 2009, 23:33
Just to be clear the arty module is your battery variable. Even if you used another method and it worked, the right way to do it is to use the arty module. Any other method is unsupported.
I am confused now. Just checked with my sample mission, if I take the module as battery variable, nothing happens.
If I take the group of the artillery, it works like a charm. Could you check, please?

Edit:
I think I found a bug:

Part of "BIS_ARTY_F_GetScope"

_logic = (synchronizedObjects _x) select 0;
if (typeOf _logic == "BIS_ARTY_Logic") then {_scope = _logic;};
Part of "BIS_ARTY_F_BatteryLead"


_objs = synchronizedObjects _scope; <- _scope should be objNull when calling the template with a group as battery-variable, I think, which would be strange
if (count _objs > 0) then
{
_lead = _objs select 0; <- this should be executed when template is called with logic as battery, which might be buggy
} else // Check if old method is being used.
{
if ((leader group _scope) isKindOf "AllVehicles") then
{
_lead = leader group _scope; <- this should be executed when template is called with group as battery


Because of "_logic = (synchronizedObjects _x) select 0;" I assume you expect a logic entity to be "(synchronizedObjects _x) select 0"
If one now calls the battery-template with the module-logic as battery-variable, _scope should be the logic, hence "count _objs" > 0, hence "_lead = _objs select 0;" is executed, which would be the logic again, and not the lead unit. That is, if my assumption is correct that "synchronizedObjects" returns an array with a logic as first element.
The fuctions mentioned reside as inline in "ARTY_CommonFunctions.sqf"

Headspace
Jun 4 2009, 13:26
schaefsky:

You did not find a bug, you found a piece of code that is no longer intended to be used--look very carefully around that part of it that you quoted. It's also part of the reason why that didn't appear in the documentation on the biki.

The Artillery Logic is the "battery". It may work if you pass the group under some limited circumstances, but that method is not supported.

I also tested your mission. It seems to work fine for me when I refer to the ARTY Logic as the battery, but you have all of the artillery pieces (instead of just one) synced, which is unecessary.

twisted
Jun 4 2009, 15:19
any way to make the shells explode in the air above the target? loved that in UA from COC and wondering if that is possible here?

CarlGustaffa
Jun 4 2009, 16:58
In Arma1, I made a fuze VT simulation (variable time fuze, aka proximity fuze) for my own artillery experiments. Although it was rather simple 'point and click' artillery, it was impossible to get the desired fuze VT results using the same shell. I had to make different shells for each of the fuzes to obtain believable results. I had for HE different shells for impact HE (fuze quick), 7m VT fuze (M728/M732), and 20m VT fuze (M513/M514). Increasing HOB should reduce the damage done significantly, while increasing its splash damage. My 20m VT had little to no effect on vehicles and armor, yet remained very effective against enemy personell. It was a potent replacement to APICM rounds, which has some operational limits you will never see be upheld by typical players.

From what I can see in the available classes, there is only one HE shell, and no fuze options. So I doubt this will be available without addons. I would looooove to be wrong though :)

De_little_Bubi
Jun 4 2009, 17:52
Hey, im using this example ari mission (ArtyDemo_MLRS_SOM.zip (http://dev-heaven.net/attachments/download/864/ArtyDemo_MLRS_SOM.zip) for the BIS Wiki).

You can add new ari requests via radio. Don't wanna do this. I want to add a new ari request ~10-20 minutes after the last one automaticaly. So you can fire artillery after the artillery reloaded. (Using mlrs launcher)
Anybody an idea how to implement it? Any events of the ArtilleryModule i could use?

Headspace
Jun 4 2009, 18:12
Bubi: Make a script that sleeps for 10 or 20 minutes, then adds the request. Pretty simple.

De_little_Bubi
Jun 4 2009, 18:25
that works for the first time, but after i adds the request there is undefined time until the player is using the artillery. after that i have to restart the script but i dont know how.

schaefsky
Jun 4 2009, 18:41
I also tested your mission. It seems to work fine for me when I refer to the ARTY Logic as the battery
Did you change anything else? How long does it take until the battery starts to shoot?
I just can't get it to work with the logic.

Headspace
Jun 4 2009, 18:45
First, I named the ARTY logic so that there was a variable to reference it by. Then, I used that variable as the battery parameter in the ExecuteMission function.

schaefsky
Jun 4 2009, 19:05
Got it to work now, don't know why I could not get it to work earlier.
Many thanks for your efforts!

Headspace
Jun 4 2009, 19:10
Many thanks for your efforts!

My pleasure. I am extremely happy that people are having fun with it.

Sam75
Jun 5 2009, 18:19
How do you tell artillery how many rounds they have to shot ? for example if i would like a BM21 to fire 5 or 40 Rounds ?

Headspace
Jun 5 2009, 18:19
How do you tell artillery how many rounds they have to shot ?

The easiest way to do that is in the fire mission template, in the documentation.

CarlGustaffa
Jun 5 2009, 19:58
Did anyone try the sadarm and laser guided projectile yet?

Sam75
Jun 5 2009, 20:15
The easiest way to do that is in the fire mission template, in the documentation.

when you say documentation you mean the wiki ?

another question about artillery, why am i limitted to one shot ? BM21 fires 10 of its 40 rounds but is no more available to request another strike, same thing with mortar teams

Acog
Jun 5 2009, 20:27
In the sample missions from wiki, how would I change the ammo used from HE to WP on the MLRS?

Headspace
Jun 5 2009, 20:53
The MLRS doesn't have a WP munition at present.

MiXeR
Jun 5 2009, 22:43
I have 2 arty positoins and want to make a strike on the 2 positions, but when i activate strike both of them shots on the second position.
[group m1, getPosASL artystr, ["IMMEDIATE", "HE", 1, 10]] call BIS_ARTY_F_ExecuteTemplateMission;
[group m2, getPosASL artystr2, ["IMMEDIATE", "HE", 1, 10]] call BIS_ARTY_F_ExecuteTemplateMission;

If i activate second strike after 20-30 seconds some boms falls on the first position (artystr) but most of them on the artystr2. Why?

Headspace
Jun 6 2009, 00:05
It looks like you're using groups instead of logics to refer to your artillery batteries, Mixer. Do you have two seperate logics? Because if you are using just one logic, it will treat it as one battery.

Acog
Jun 6 2009, 01:02
Works like a dream. Is it possible to (in the sample MLRS missions, which I used to tweak with) to shut off the SecOps so I dont get any tasking at all? I just want the arty.

Baron von Beer
Jun 6 2009, 01:17
Yep, Beita posted in another thread, tested and seems to work. Put this in the SOM logics init field:

this setVariable ["settings", [[], true, nil, nil, false]];

Acog
Jun 6 2009, 01:18
Most excellent! thank you!

MiXeR
Jun 6 2009, 11:07
It looks like you're using groups instead of logics to refer to your artillery batteries, Mixer. Do you have two seperate logics? Because if you are using just one logic, it will treat it as one battery.

I have 2 logics, but when i deleting one of them all artys continies shoot lol. O_o

Armin2
Jun 6 2009, 13:59
CAN YOU HELP ME WITH THIS:

I want to make a lone wolf mission where there is an MLRS tank located that I can switch to (by simply switching the player with "t") and then give my lone wolf some artillery support.

I want to start playing as the lone wolf and then if needed switch to the artillery.
BUT the artillery module only works with the player you start as.

Is there any (simple) way to first let me play as the lone wolf and then switch to the artillery module ?

stuguy
Jun 6 2009, 16:21
I tried the MLRS artillery missions in the editor that were placed in the biki section as examples of working arty missions using both real and virtual units. Triggering radio command alpha will not do anything for me. It just makes a bleep noise and does absolutely nothing. Now I have played around with all the artillery and MLRS by manual control, so I get the jist of the ranges of this stuff. But I have been unable to get this to work. With or without SOM. Am I supposed to make a separate SQF file and place it in my mission directory or something? I am new to this, and all the steps listed give commands that do absolutely nothing by themselves. I have no idea what to reference to what, and how to put it all into play. I have read all the documentation and logs over and over, and all I see are scripts upon scripts, but no real explanation as to where I am supposed to put it, and how it works with the game modules. The biki just assumes I am supposed to know what they are talking about.

Edit: what do I need to do to make headspace's sample missions actually shoot arty? Can someone please give step by step directions, not just a bunch of commands that do nothing for me when i don't know how to implement them into the game.

Baron von Beer
Jun 6 2009, 17:15
CAN YOU HELP ME WITH THIS:

I want to make a lone wolf mission where there is an MLRS tank located that I can switch to (by simply switching the player with "t") and then give my lone wolf some artillery support.

I want to start playing as the lone wolf and then if needed switch to the artillery.
BUT the artillery module only works with the player you start as.

Is there any (simple) way to first let me play as the lone wolf and then switch to the artillery module ?


So you want to physically control the MLRS? If so, this is pretty simple. Place an arty logic, not synchronised to anything. Place your units (Player, MLRS, anything else).

You MUST add an artillery magazine to the MLRS, or you will just blow yourself up whenever you fire. To do this, add this line in the unit's init field in the editor:
this addmagazine "ARTY_12Rnd_227mmHE_M270 "

Now when you switch to the MLRS, choose to reload (to the magazine you added), and open the arty targeting interface. Should be set.

MiXeR
Jun 6 2009, 17:34
I have 2 logics, but when i deleting one of them all artys continies shoot lol. O_o

With virtual arty all works fine

Armin2
Jun 6 2009, 18:31
So you want to physically control the MLRS? If so, this is pretty simple. Place an arty logic, not synchronised to anything. Place your units (Player, MLRS, anything else).

You MUST add an artillery magazine to the MLRS, or you will just blow yourself up whenever you fire. To do this, add this line in the unit's init field in the editor:
this addmagazine "ARTY_12Rnd_227mmHE_M270 "

Now when you switch to the MLRS, choose to reload (to the magazine you added), and open the arty targeting interface. Should be set.

No that doesn't work. I want to switch to the MLRS later while playing. But the logic only works if you start as artillery right from the beginning.

Cougar
Jun 6 2009, 18:52
No that doesn't work. I want to switch to the MLRS later while playing. But the logic only works if you start as artillery right from the beginning.


Yes the target artillery is somehow attached to the first unit you play. But you could set up to have your main character at the arty and swap to the mission team.

AussieTerry84
Jun 6 2009, 19:38
I've been reading through this thread but sorry even though its great and all it really is missing a very basic step by step lesson on how to make it all work.

Even on the biki it says nothing about putting triggers in it just gives the command line, im pretty new to this and found it very unhelpful that it didn't say it had to be typed into a trigger, i kept putting it in the module.

stuguy
Jun 6 2009, 19:51
I've been reading through this thread but sorry even though its great and all it really is missing a very basic step by step lesson on how to make it all work.

Even on the biki it says nothing about putting triggers in it just gives the command line, im pretty new to this and found it very unhelpful that it didn't say it had to be typed into a trigger, i kept putting it in the module.

I 2nd that! My longer complaint is similar, and the Headspace SOM missions don't work for me. The radio just makes a beep. Teleport works however...

schaefsky
Jun 6 2009, 19:57
Made a simple demo mission for arty without SOM.
Check here:
http://www.ofpec.com/forum/index.php?topic=33437.15

Headspace
Jun 6 2009, 21:58
I've been reading through this thread but sorry even though its great and all it really is missing a very basic step by step lesson on how to make it all work.

Even on the biki it says nothing about putting triggers in it just gives the command line, im pretty new to this and found it very unhelpful that it didn't say it had to be typed into a trigger, i kept putting it in the module.

That is what the two demo missions are for. Check those out if you are confused about where to put things.

-Paladin-
Jun 7 2009, 01:32
Made a simple demo mission for arty without SOM.
Check here:
http://www.ofpec.com/forum/index.php?topic=33437.15

It works good, the SOM dont work when I use it, probely I do somthing wrong.But this is great after many disapotments I coud blow stuff up and i love it. Take this arty mission som script :-P

I will try to learn from both exampels thank you schaefsky:)

Armin2
Jun 7 2009, 08:12
I think for us noobs it's best to just save all those examples (artillery, HALO Jump etc.) and then drag and drop it into our own missions when needed.

Callisto
Jun 7 2009, 15:52
Is there a way to get the AI to use artillery
Schaefsky's mission works fine, but I'd like the enemy to use the same function (How do i get them to radio in?)
What I mean is that I want the enemy side to use artillery on me.

beita
Jun 7 2009, 17:34
As far as I know, the AI will not actively use artillery on their own.

A script is needed to get them to use it.

Something as simple as a large Detected by trigger works (I've used it in Arma 1).

You could also make it count the number of detected units so that they don't use artillery on a single troop.

EDIT:

Just made a simple one.

Make a trigger, activated by BLUFOR, click the "Detected by OPFOR" button. In the On activation field put:



[rbatt82, getPosASL (thisList select 0), ['IMMEDIATE', 'HE', 0, 10]] call BIS_ARTY_F_ExecuteTemplateMission;


Where rbatt82 is the name of your artillery game logic.

Bingo, enemy artillery that is called on detected BLUFOR.

Headspace
Jun 7 2009, 18:47
beita: That's good, except you want to use a getPosASL instead of getPos. Elevation matters when the firing solution is calculated.

beita
Jun 7 2009, 19:15
beita: That's good, except you want to use a getPosASL instead of getPos. Elevation matters when the firing solution is calculated.

Ah, yeah, forgot about that!

Callisto
Jun 7 2009, 22:56
Well, actually, that doesnt seem to work.
Wish I could provide more information but I really did follow your instructions perfectly as they were provided and nope, the AI doesnt fire. I made sure the enemy was in range of the trigger.

Pauld
Jun 10 2009, 22:41
edit. got it to work thanks

beita how can i get the arty to fire within the trigger but in random locations

beita
Jun 10 2009, 22:59
...

beita how can i get the arty to fire with in within the trigger but in random locations

That is a bit more complex.

Uhh, maybe make a Game Logic where you want the random arty to start, then (on the server) make some random X and Y offsets and add them to the position that you send in the artillery function call.

Should work ..

Pauld
Jun 10 2009, 23:05
basicly what i see is the arty being trggerd and firing but the rounds are falling in the postion where the trigger was activated, what im asking is it possible for the arty to follow that person who triggered it,

how about can i make a virtual arty and have it activated on a trigger?

beita
Jun 10 2009, 23:09
basicly what i see is the arty being trggerd and firing but the rounds are falling in the postion where the trigger was activated, what im asking is it possible for the arty to follow that person who triggered it,

...

Ah, well, that's how artillery works ..

What you want is an algorithm for the AI to predict where the enemy is going to move.

Tough stuff to do.

Headspace
Jun 10 2009, 23:52
You could use thisList (from the trigger) to fire on the location where AI was spotted.

[GLT] Legislator
Jun 11 2009, 07:06
Hi there,

I guess I need some help with this module. Using the artillery module I want the enemy AI to fire at the players location. I set up the artillery as described in the bohemia wiki but it doesn't work :( Is this module only working with human players? How do I have to setup the module if I want the AI to bomb an empty area via artillery?

Thanks for your help in advance.

whisper
Jun 11 2009, 08:22
You want to kill the player? ;) Arty is pretty big boom in A2 :D

[GLT] Legislator
Jun 11 2009, 08:53
You want to kill the player? ;) Arty is pretty big boom in A2 :D

Maybe, but mainly I want to shock them. ;) I've got a small landing sequence which needs some pimp. AAVs coming out of the water deploying troops at the beach, soldiers clearing enemy mines at beach, several enemy corpses and barricade stuff from the mission before ... but ... I'd like to let the AI defend theirselve via artillery. If that means killing the player, so be it :D

Headspace
Jun 11 2009, 17:36
Legislator: Set the artillery up as described in the biki. Put a trigger on the beach where the AAV's show up. In the activation field of the trigger, put the call to BIS_ARTY_F_ExecuteTemplateMission.

[GLT] Legislator
Jun 11 2009, 18:34
Ok please lets start from the beginning because my head starts to hurt right now. I know there have to be some arrays. Somehow I'll have to start with:

_heTemplate = [“IMMEDIATE”, “HE”, 0, 15];

There is no hint in the biki where I should put this. Does this have to be in the init.sqf, an external script or in a trigger?

CarlGustaffa
Jun 11 2009, 20:53
What aer the effects of using WP on units and equipment?

vengeance1
Jun 12 2009, 04:41
Legislator,

If it helps Xeno uses an ARTI in his ARMA2 Mission (co50_AirCavA2.Chernarus.pbo), download that and have a look at how it did it. Hope that helps.

CarlGustaffa
Jun 12 2009, 05:13
I see no new artillery being used in that mission? Where is it? ;)

@<hidden>: If playability and scaryness is your deal, you should have a look at my Dominatrix version of Xenos scripts. The enemy there will use all kinds of (scripted, not the new ones obviously) artillery based on situations. They will even use illumination harrasement missions, causing NVGs to become a problem, using low delivery altitudes, behind themselves :) Also, in order not to become too insane for the player, the enemy FDC is kind enough to always use adjustment, very inaccurate adjustment. So, before the main rounds arrive, you have a chance of getting away. If you're hurt or pinned down, well, you might have a problem :)

Can't help you with the new system though.

[GLT] Legislator
Jun 12 2009, 15:28
@<hidden>:
The AirCav artillery is not the A2 module artillery.


Somehow the AI artillery isn't working :( For test purposes I activate the enemy artillery via radio triger: [Art1, test, ["IMMEDIATE", "HE", 0.5, 15]] call BIS_ARTY_F_ExecuteTemplateMission;

Art1 = Artillery Module (but I tried Art1 as the Podnos groupleader as well), synchronized to the Podnos groupleader
test = me, the player

That's in the arma2.rpt

Error in expression <], true] call BIS_ARTY_F_NetRun;


if ((count _targetPos) == 2) then {
_targetPo>
Error position: <count _targetPos) == 2) then {
_targetPo>
Error count: Typ Objekt, erwartet Array,Config entry
File ca\modules\ARTY\data\scripts\ARTY_ExecuteMission.sqf, line 73

Headspace
Jun 12 2009, 17:13
Legislator: It's not working because the second parameter is a position, not an object. You need to do getPosASL test if test is an object.

[GLT] Legislator
Jun 12 2009, 17:31
Thanks for the hint. I've changed it to [Art1, getPosASL test, ["IMMEDIATE", "HE", 0.5, 15]] call BIS_ARTY_F_ExecuteTemplateMission;

No ArmA2.rpt entries so far, but no artillery impacts as well. I've waited more than 1 minute for the impacts. The Podnos launchers are around 200 metres away from the beach by the way. Too close?

beita
Jun 12 2009, 18:42
Are the mortars firing? You can physically aim straight up with the mortars and kill yourself with the rounds (did this with the USMC 81mm), the AI has a ~20m circle around them where they can't fire though.

Set yourself next to the mortars and then call the fire mission, if the mortars shoot, the rounds are very likely to land. Wait longer I guess?

[GLT] Legislator
Jun 12 2009, 18:47
They aren't firing at all :( I placed them somewhere else on Utes but they didn't fire again. I used the Virtual Artillery instead - no success.

Himmelsfeuer
Jun 12 2009, 19:11
I downloaded the Artillery Test Miision with Sec OP Command and since its hard to get that stuff self working i just wanted to copy the mission and use the artilliery support.The Problem is that u get secundary missions all the time from the Sec OP Logic and i cant find where that is written in a script/editor..maybe someone can help so that u can only use the artillery support without the secoundary mission request stuff...
Thats how the mission.sqm looks
http://rapidshare.com/files/243833455/mission.sqm.html
,i did it by myself just watching on the bohemia arti mission.Just cant find what makes u have to request the missions like"search the insurgents" and stuff..
Help would be much appreciated:confused:!thx

CarlGustaffa
Jun 12 2009, 19:14
Yea, I heard from Xeno he wasn't using the new modules.

[GLT] Legislator
Jun 12 2009, 20:53
I did it!!! :yay::yay::yay:

Now if you want some Podnos firing at a certain location try it this way:

Place a group of Podnos static launchers, make one groupleader
Place the Artillery Modul and call it AriLogicName, synchronize it to the Podnos groupleader
Place a trigger and let him executed a script: [TargetArea] exec "scripts\artillery.sqs";
Create the artillery.sqs (see below for code)


artillery.sqs


_target = _this select 0;
_heTemplate = ["IMMEDIATE", "HE", 0, 15];
_targetpos = getposASL _target;

[AriLogicName, _targetpos, _heTemplate] call BIS_ARTY_F_ExecuteTemplateMission;

Exit

Now if you want to change the target, simply change the way you call the script. For example: [NewTarget] exec "scripts\artillery.sqs";

The script is in the folder "scripts" which I created for my mission. Of course the sqs file can be whereever you want it.

beita
Jun 12 2009, 21:09
Ah, now that you mention it, you might be able to get the same results with a single line thing from a trigger too.

In this code:



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


Change the double quotes to single quotes,



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


And presto! It works for some reason. Sending strings to functions (at least this function) needs to be done with single quotes. Double-double quotes ("" "") might work too ...

twisted
Jun 13 2009, 21:03
i set up arti with a few cannons. but when i call it the cannons do nothing but they say shot over and rounds complete even though i've been watching them just sitting there. the intrusctions i followed where those on BIS wiki.

Sam75
Jun 13 2009, 21:13
I've been reading through this thread but sorry even though its great and all it really is missing a very basic step by step lesson on how to make it all work.

Even on the biki it says nothing about putting triggers in it just gives the command line, im pretty new to this and found it very unhelpful that it didn't say it had to be typed into a trigger, i kept putting it in the module.

you must be using virtual artillery then not the canons.

Headspace
Jun 13 2009, 22:35
What new types of demo mission would you guys want to demonstrate how to do things? I'm open to suggestions.

Headspace
Jun 14 2009, 16:05
Update: The wiki page now has some functions and scope variables documented.

schaefsky
Jun 14 2009, 19:48
I would like to see a demo mission setup without SOM but whith SOM's bells and whistles (radio messages, point and click...) :)

CarlGustaffa
Jun 14 2009, 20:48
Well, I'm still interrested in WPs effect on soldiers and materiell :)

MBot
Jun 15 2009, 07:29
It seems to me that by using the SecOps Manager you only get a single artillery strike, even when using the 'adjust fire' strike (which makes it pretty pointless, since you don't get to adjust anything...). Is there a simple way to get strikes as long as the battery has ammo?

I think it would be a good idea to add the line to the artillery biki how to disable SecOps in the SOM module for the people that only want to use SOM to get the artillery request interface.

beita
Jun 15 2009, 21:39
I've got a request/question:

Would it be possible to put the exact min/max ranges of each artillery piece on the biki or this thread?

Would be helpful when planning out missions.

Headspace
Jun 15 2009, 22:46
Would it be possible to put the exact min/max ranges of each artillery piece on the biki or this thread?

That info is readily available by using the commands listed in the biki, but I don't see why not. Just keep in mind that minimum and maximum range are going to vary with the height of the terrain--I'm going to be able to lob a shell a lot father from 1200 meters elevation down to a 300 meter elevated level then I would be able to do so against a target elevated the same or higher than me.

beita
Jun 16 2009, 05:07
Ah, neat. Could make a quick script that outputs some markers for those ranges. Would still be helpful to have an easy reference for rough min/max ranges though.

twisted
Jun 16 2009, 13:51
i found a bug in the example missions on the biki. see i always wanted to look at the art while it fires. so i moved them to next to the player and went through the arti support request process. they didn't move to fire.

i changed them to the cannons. same deal.

reloaded the base mission - worked ok as it came but why not when i move the art i(mlrs or cannon) closer to me to watch em in action?

Headspace
Jun 16 2009, 14:53
What location were you telling them to fire at?

My Fing ID
Jun 17 2009, 05:07
EDIT: This works. Needs improvement but it does function.


Here's what I've been working on. It doesn't require secops and let's you set up custom fire missions in the function call. You would call it like this:

Nul=[bat,type,ord,delay,rnds,disp] execvm "FireMission.sqf";

Bat = name of artillery game logic
Type = timed or immediate fire, can use t for timed
Ord = type of round used like HE, WP, etc
Delay = time between rounds fired. If timed then how long rounds fire for
Rnds = total rounds fired
Disp = dispersion.

The rounds are shot from the weapons so don't stand infront of a mortar tube! This script was only tested with US mortars but has at least 1 fatal flaw, I can't get the mapSingleClick command to work properly. Due to this the artillery will always target the player. I tried turning the code into 2 blocks so the mapSingleClick would call the rest of the code, but then my vars went bad. So I changed the vars to global but then mapSingleClick stopped calling the rest of the script. Hope one of you can fix it.

Got to be honest I can't remember which version of the script this is so it may not work at all. Also the splash over and such hints don't work well. Also I'm at work and had to post from my BB so if it doesn't look pretty, sorry


EDIT:

K I think this may work. I'm using the marker (ty Wiper) to store the pos and then transfer that pos to _tPos. Hope this works.

If anyone would like to test it here's a quick instruction.

Make a map with you as a player. In your units 'INIT' field put this radio code:

1 setRadioMsg "Fire HE"; 2 setRadioMsg "Fire WP";
3 setRadioMsg "Fire Illum";

Next make some artillery. Don't worry about adding ammo, it'll work as long as you use the right name.

K. Now add an artillery Game Logic. Name it Battery1. Synchronize it with the mortar team leader.

Finally were going to add 3 triggers, one for each ammo type (HE, WP, ILLUM). Make the three triggers, set them to repeatable. Then for activation select the radio codes Alpha, Bravo, and Charlie. Next on the On Activation line enter the following:

under the Alpha radio command:
Nul=["Battery1","I","HE",2,10,50] execVM "FireMission.sqf";

under the Bravo radio command:
Nul=["Battery1","I","WP",2,10,50] execVM "FireMission.sqf";

under the Charlie radio command:
Nul=["Battery1","T","ILLUM",6,30,500] execVM "FireMission.sqf";

Finally cut and paste his code into notepad. Then save it in your mission file (my documents/documents/Arma 2/missions/ I think). Name it FireMission.sqf



glbbattery =_this select 0;
glbtype =_this select 1;
glbordType =_this select 2;
glbdelay =_this select 3;
glbrounds =_this select 4;
glbdispersion =_this select 5;
_tPos=position player;



hint "click on the map";
onMapSingleClick "[_pos] call ArtFire; onMapSingleClick ''; true;";


ArtFire
={
_tPos = _this select 0;

hint "clikced";

_marker = createMarker["Marker1",_tPos];
"Marker1" setMarkerPos _tPos;
"Marker1" setMarkerShape "Icon";
"Marker1" setMarkerType "dot";
"Marker1" setMarkerSize [1,1];
"Marker1" setMarkerColor "ColorRed";

if not((glbordType == "WP")or (glbordType == "SADARM") or (glbordType == "LASER") or (glbordType == "ILLUM") or (glbordType == "SMOKE")) then
{
glbordType="HE";
};

_fMission=["Immediate",glbordType,glbdelay,glbrounds];

if ((glbtype == "timed") or (glbtype == "Timed") or (glbtype == "t") or (glbtype == "T")) then
{
_fMission=["Timed",glbordType,glbdelay,glbrounds];
};

if not ([glbbattery,_fMission] call BIS_ARTY_F_StillViable) then
{
Hint "Artillery out of commission.";
exitWith;
};

if not ([glbbattery,_fMission] call BIS_ARTY_F_IsAvailable) then
{
Hint "Artillery unavailable at this time.";
exitWith;
};

If not ([glbbattery,_tPos,glbordtype] call BIS_ARTY_F_PosInRange) then
{
hint "out of range.";
exitWith;
};

[glbbattery,glbdispersion] call BIS_ARTY_F_SetDispersion;

[glbbattery,_tPos,_fMission] call BIS_ARTY_F_ExecuteTemplateMission;

If (glbbattery getVariable "ARTY_BADTARGET") then
{
hint "Bad Target, aborting mission";
exitwith;
};

waitUntil {glbbattery getVariable "ARTY_SHOTCALLED"};
hint "Shot fired, over";
waitUntil {glbbattery getVariable "ARTY_SPLASH"};
hint "Splash, over";
waitUntil {glbbattery getVariable "ARTY_COMPLETE"};
hint "Rounds complete, over";
};




If everything worked you should have a radio on the map screen with 3 options.

Charliereddog
Jun 19 2009, 21:37
I'm trying to get the wiki example to work. Please don't point me in the direction of SOM, or anything else, I simply want to understand the example shown in the wiki.

I am getting this error in my rpt file.

Error in expression <template select 3 ];
if (count _missionTemplate >= 5) then
{
_params = >
Error position: <_missionTemplate >= 5) then
{
_params = >
Error Undefined variable in expression: _missiontemplate
File ca\modules\ARTY\data\scripts\ARTY_CommonFunctions.sqf, line 312


I'm calling this from arty.sqf which is as follows:


_heTemplate = ['IMMEDIATE', 'HE', 0, 2];
_myBattery=lgc_art;
_targetPos=getPosASL tgt;
[_myBattery, _targetPos, _heTemplate] call BIS_ARTY_F_ExecuteTemplateMission;

Headspace
Jun 19 2009, 21:50
Charliereddog: That's a known issue; however I have not observed it to affect the outcome of the fire mission. Is your fire mission working?

Alex72
Jun 19 2009, 21:59
Anyone with example mission with physical AI operated artyguns where I as a player can give them targets via map and then see them fire? Sorry didnt read through it all. Small pointer to an example mission if available would make my day.

Alex

Charliereddog
Jun 19 2009, 21:59
well, I'm sat next to the guns, and they don't seem to respond in any way. They certainly ain't firing. So long as it's not an error in my code, i'll not worry too much about it for now, and come back to it later on.

KKB
Jun 19 2009, 22:46
EDIT: This works. Needs improvement but it does function.


I get "Out of range", regardless where I click on the map. Tried with Mortars and M119. Any Idea what may be the issue?

Manzilla
Jun 19 2009, 22:52
72;1317630']Anyone with example mission with physical AI operated artyguns where I as a player can give them targets via map and then see them fire? Sorry didnt read through it all. Small pointer to an example mission if available would make my day.

Alex

Alex, check back a few pages. Some one posted a real basic artillery example mission. I think it's this thread. If not let me know and I'll find them on my PC and upload em somewhere.

Alex72
Jun 20 2009, 04:23
I give up until i have ARMA2 and then go back track all post trying to find it. Even though i see more people wanting this i dont think anyone made it yet. Dont think its that easy.

Thanks though Manzilla. ;)

KKB
Jun 21 2009, 00:07
I made a little video based on the example mission by Headspace.

http://www.youtube.com/watch?v=pBXCJaqwpK4

Rommel
Jun 21 2009, 01:08
Example missions aren't working in 1.02? :(

All the artillery pieces just aim up, but never fire.

Callisto
Jun 21 2009, 23:39
yes I noticed that too.
does anyone have a fix?
I assume it has something to do with the modules being moved from Game Logic to their own category "Modules" in the editor, but simply replacing them does not seem to do the trick.

Hellfire257
Jun 23 2009, 17:04
Hi,

After looking at all the stuff to do with the Arty, I can't make heads or tails of it (Im a scripting noob). Im looking to have say 8 M119s at a FOB give arty support. I would then like to have the target designated via a map click and then fire without all the SOM stuff. Could someone please post instructions rarther than an example missions as I would like to do it and learn myself.

Thanks,
Hellfire

Headspace
Jun 23 2009, 21:59
Guys,

I've seen no issues with 1.02 so far, so if you can tell me exactly what you're doing (when it's not working) it'd be appreciated. Also note that the first (but not the later) version of VOP sound did something which caused an issue, and I believe that's been fixed.

Hellfire: If you just want to click on the map and have it happen, the tutorial in the "Quick Start" portion of the biki tells how to do that. Put your ExecuteTemplateMission command inside the action portion of a radio trigger and you'll be good to go. It may seem daunting at first, but it's rather straightforward once you do it once.

schaefsky
Jun 23 2009, 22:12
disregard please...

beita
Jun 24 2009, 03:55
Little bit of a complicated question ...

If I wanted to create an artillery battery when the mission is in progress, what would I have to do in order to get the group leader synced to an artillery logic? Is it possible to do after a mission has started?

Hellfire257
Jun 24 2009, 07:08
I wouldn't have thought so Beita.

Headspace: Ive managed to get the basics now. Ive gotten the Arty to fire via a Radio Trigger upon a target named "target", but I dont know how to get it to target a location clicked on the map, and Im also wondering how I can get the Strike to come available again after 5 minuntes.

Gambler
Jun 24 2009, 07:31
@<hidden>: 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?

MadTommy
Jun 24 2009, 09:39
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 on the map does nothing.. i've done everything i can think of.. i get no on screen hints or tips. Pointing the laser designator does nothing..

What does work: The teleport function... the random radio chatter and orders.

I haven't altered the mission in any way.. i'm loading the mission via > multiplayer > new mission.

I'm just left scratching my head. Can anyone help... i'll make a video and upload it if that will help.

somethingcool
Jun 24 2009, 13:18
You press and hold space then when the menu pops up click on communication (just click), then hit 1 for request support then 1 again for artillery barrage. Simples!

MadTommy
Jun 24 2009, 13:31
Thank you!! :icon_dj:

Was i being dumb and i simply missed these instructions or what.. as I never saw this mentioned! :eek: :o

somethingcool
Jun 24 2009, 13:51
No worries mate, I just spent hours playing with it and found the space bar thing.

A question for a genius, when you manually target the mortars it gives you a time of flight (i.e 40seconds) for the ranges, how would I use get that information on the fly so that AI could call "Shot over, four-zero seconds" or something along those lines.

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

Cheers

Headspace
Jun 24 2009, 17:12
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).

frattonstation
Jun 24 2009, 17:35
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!

Armin2
Jun 24 2009, 17:41
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.

frattonstation
Jun 24 2009, 18:12
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?

beita
Jun 24 2009, 18:14
@<hidden>: 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.

frattonstation
Jun 24 2009, 18:24
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!

Headspace
Jun 24 2009, 19:46
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.

somethingcool
Jun 24 2009, 19:50
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

beita
Jun 24 2009, 20:04
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.

Volw
Jun 25 2009, 01:12
Information on how to make missions using the Artillery Module can now be found on this page. (http://community.bistudio.com/wiki/Artillery_Module)

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.

AzureNight
Jun 25 2009, 05:15
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.

somethingcool
Jun 25 2009, 12:40
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?

Apocca
Jun 25 2009, 13:51
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.

Volw
Jun 25 2009, 14:02
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.

somethingcool
Jun 25 2009, 14:43
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...

Apocca
Jun 25 2009, 16:17
Wiki still aint up. Could anyone tell me which munitions the mortar could use, and what their IDs are?

AzureNight
Jun 25 2009, 20:28
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?

robert13
Jun 26 2009, 05:36
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

Volw
Jun 26 2009, 10:46
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?

Headspace
Jun 26 2009, 11:05
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.

Volw
Jun 26 2009, 12:22
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).

Daskidd821
Jun 27 2009, 08:13
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

Hellfire257
Jun 27 2009, 09:21
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?

Volw
Jun 27 2009, 11:05
SOM doesn't work on dedicated servers atm.

Tarrok
Jun 27 2009, 16:14
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

arthur666
Jun 27 2009, 19:50
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.

Cryptix
Jun 27 2009, 22:22
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?

Bascule42
Jun 28 2009, 01:42
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.

rowdied
Jun 28 2009, 04:56
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.

Volw
Jun 28 2009, 10:39
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.

arthur666
Jun 28 2009, 17:16
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...

Ghost
Jun 28 2009, 21:49
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.

Wiggum
Jun 29 2009, 20:17
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) ?

Crazyfox
Jul 1 2009, 19:09
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.

Ghost
Jul 3 2009, 15:29
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?

Redfield-77
Jul 4 2009, 19:14
Nevermind got it working. :D

Arak-Nafein
Jul 4 2009, 21:12
***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*

Steeltalon
Jul 5 2009, 01:08
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.

Crazyfox
Jul 5 2009, 12:16
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.

OuchShot
Jul 5 2009, 23:07
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

Volw
Jul 5 2009, 23:07
@<hidden>


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 ?

OuchShot
Jul 5 2009, 23:29
arh yes, checked the full file names, and they were incorrect, sorted now and it works fine.
Thanks very much Volw :D

Redfield-77
Jul 6 2009, 03:15
@<hidden>

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!

kylania
Jul 6 2009, 04:51
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.

Apocal
Jul 7 2009, 11:45
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 :)

5urge
Jul 7 2009, 17:56
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

Apocal
Jul 7 2009, 17:57
n/t

...

[GLT] Legislator
Jul 8 2009, 21:42
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?

John_P
Jul 8 2009, 21:46
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!

Volw
Jul 10 2009, 01:18
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.

Apocal
Jul 11 2009, 16:57
Is there any documentation regarding configuring additional addons into the Artillery Module?

nozra
Jul 13 2009, 08:02
alright so i tried Volw's arty method too,

and like a previous poster im standing next to an MLRS and its not firing.

ive synchd arty module to my player character

i radio juliet, place a marker, radio hotel, get the battery firing message and have no response from the MLRS's

SO, is there something in the activation line for the 2nd trigger that i'm missing?
[Art1, getPosASL tgt1, ["TIMED", "HE", 1, 60]] call BIS_ARTY_F_ExecuteTemplateMission; hint "Bat1: Firing.";

or... is it that the arty pieces have to be synched or grouped some way?

Apocal
Jul 13 2009, 09:34
alright so i tried Volw's arty method too,

and like a previous poster im standing next to an MLRS and its not firing.

ive synchd arty module to my player character

i radio juliet, place a marker, radio hotel, get the battery firing message and have no response from the MLRS's

SO, is there something in the activation line for the 2nd trigger that i'm missing?
[Art1, getPosASL tgt1, ["TIMED", "HE", 1, 60]] call BIS_ARTY_F_ExecuteTemplateMission; hint "Bat1: Firing.";

or... is it that the arty pieces have to be synched or grouped some way?

ARTY Mod should be sync'ed to the (group leader) artillery piece, not your player character.

John_P
Jul 13 2009, 14:04
MLRS has a very large minimum range. Try placing it (much) further away.


This was the case, followed your guide again and placed some m119 howitzers and placed a firing marker some distance away and they fired :] thanks!

nozra
Jul 13 2009, 16:46
ARTY Mod should be sync'ed to the (group leader) artillery piece, not your player character.

oh ho... haha clever man. thanks

edit: still no good, gonna try doing a little self diagnosis and get back to u..

i have both triggers made, one referencing the script.

is the player character at all involved with the arty module or the actual arty piece?

Apocal
Jul 14 2009, 08:41
is the player character at all involved with the arty module or the actual arty piece?

Shouldn't be. Try placing MLRS at least 8km away. It does have a massive minimum range.

DFP
Jul 18 2009, 11:36
I did it!!! :yay::yay::yay:

Now if you want some Podnos firing at a certain location try it this way:

Place a group of Podnos static launchers, make one groupleader
Place the Artillery Modul and call it AriLogicName, synchronize it to the Podnos groupleader
Place a trigger and let him executed a script: [TargetArea] exec "scripts\artillery.sqs";
Create the artillery.sqs (see below for code)


artillery.sqs


_target = _this select 0;
_heTemplate = ["IMMEDIATE", "HE", 0, 15];
_targetpos = getposASL _target;

[AriLogicName, _targetpos, _heTemplate] call BIS_ARTY_F_ExecuteTemplateMission;

Exit

Now if you want to change the target, simply change the way you call the script. For example: [NewTarget] exec "scripts\artillery.sqs";

The script is in the folder "scripts" which I created for my mission. Of course the sqs file can be whereever you want it.


I cant seem to get it to work , if tried several ways that i've seen here in the forum but right now, i can make them shoot but they always shoot in the wrong direction , i cant even hear the shells exploding. d-30s or mortars is the same thing, it seems they are shooting at the lower left corner of the map. What am i doing wrong?

redrumNL
Jul 20 2009, 21:44
Hi guys.
I use this method.
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;
Al works great, but my question is, is there a way to let my whole team call in artillery by radio and choose a fireround and set target then fire it? (in multiplayer), or is it just the leader? So some friends in my server can call in arty to.
I already tryed putting a second SOM Game Logic and synchronized it to the other playble unit, but then if i ask arty it is asking it twice on the radio channel..

Howww? thanks.:D

Coyota
Jul 21 2009, 16:48
Ever since ofp i have done arty with a script that just places random explosions at target area.
This arty module gave me a reason to try with real battery.

I thought i share what i came up with.
You can see how it works from the sample mission but i did also wrote instructions in readme file.
It's nothing fancy but those that don't do scripting could find this usefull.

http://www.filefront.com/14091027/SAMC.rar

chappy
Jul 24 2009, 03:48
so as it stands the SOM doesnt work on a dedicated server?

@<hidden> is your script working in MP dedicated servers?

LJF
Jul 24 2009, 11:52
I'm sorry but I've had absolutely no luck at all with Artillery in A2, I haven't even seen it used. I tried making it, I tried using the examples, I tried following the instructions here, nothing, it simply doesn't work for me, the only time I've gotten any kind of a result was with one artillery example, although good it dropped my framerate from 55 down to 7, which wasn't really a very good solution, can anyone point me to a reliable and working example mission?

Edit: Sorry, just tried that example above, it works, that is brilliant, thanks heaps.

redrumNL
Jul 24 2009, 16:18
@<hidden>
Im new to editing, but this one worked the first time i tryed, just read really good and follow steps 1 by 1..

1 -----------------
Make a player unit (must be the highest member in the squad i think, only he can call in arty)
2 -----------------
Make the SOM Game Logic module, synchronize that to the player
(SOM stands for SecOp manager, found by modules)
3------------------
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;

(if you want airstrike to press space after the first code then put in)


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

So copy this, ctrl c then ctrl v in the, on activation field, of the trigger(or just type it)
4-------------------
Then when you want the artillery(or airstrike), go to the map(m) (you will see a radio) and trigger radio alpha, then press space and use the communication

There you go.. Let us know if you did it..

LJF
Jul 25 2009, 05:58
Yeah, that worked really well, one of the best Artillery examples I've seen, the only problem I have with it is the secondary operations [attack location/rescue hostages etc] - is there a way to have just the artillery?

redrumNL
Jul 25 2009, 21:00
I dont know. thats what im looking for to..
And i wanna know how to call artillery for all members in the squad or more players on same team..

Someone ? ?

chappy
Jul 26 2009, 01:39
so as it stands the SOM doesnt work on a dedicated server?

@<hidden> is your script working in MP dedicated servers?


Been doing some more searching, i note that the SOM got some love with 1.02 for use on dedicatd server, did that rectify issues with the arty mod at the same time?

Apocal
Jul 26 2009, 04:39
Been doing some more searching, i note that the SOM got some love with 1.02 for use on dedicatd server, did that rectify issues with the arty mod at the same time?

Arty mod works just fine for dedicated servers, at least from the US release.

chappy
Jul 26 2009, 05:36
great thanks for the info

ruebe
Aug 4 2009, 22:13
My tip for anyone still struggling making this thing work: check your range!

EricM
Aug 5 2009, 08:42
Anyone tried the arty module lately with MLRS or GRAD ? It had been a while since last time I used it with MLRS, so I wanted to have some fun last night...

And it didn't work...

With D30, no problem, but with MLRS or Grad (same settings as D30) the targeting interface wouldn't move... (the mini map show up, but the target cursor stays fixed)

Worse : when I shoot with the MLRS, I explose as if I just shot in the gound...

Anyone else had this behaviour ? Is this 1.02 ?

nullsystems
Aug 20 2009, 21:01
Sorry, posted in wrong forum. Delete this

nullsystems
Aug 21 2009, 18:28
Arty mod works just fine for dedicated servers, at least from the US release.

I just tried to use the Artillery from the SOM, works fine locally or in editor...

Tried this in a trigger:

[["artillery_barrage"], player, [[RIPPER, [2,3,4,9]]]] call BIS_SOM_addSupportRequestFunc;

Absolutely nothing showed up on a dedicated server.

Is there anyway to get arty on a dedicated?

DrStrangeLove_EBDA
Aug 21 2009, 20:04
Anyone tried the arty module lately with MLRS or GRAD ? It had been a while since last time I used it with MLRS, so I wanted to have some fun last night...

And it didn't work...

With D30, no problem, but with MLRS or Grad (same settings as D30) the targeting interface wouldn't move... (the mini map show up, but the target cursor stays fixed)

Worse : when I shoot with the MLRS, I explose as if I just shot in the gound...

Anyone else had this behaviour ? Is this 1.02 ?

1.03, just set up an MLRS and it's working fine. You get in the gunner's position, call arty, the minimap shows up, then you point the rocket launcher practically straight up. The targeting shows and you can hit everything from 8K out. It doesn't work on antything targeted closer than 8k unless you somehow change the minrange.

EricM
Aug 21 2009, 21:19
1.03, just set up an MLRS and it's working fine.

Lucky you, because I've got an error message and no matter how high I point (77,5°) the targeting won't show up with MLRS.

nullsystems
Aug 21 2009, 21:47
Arty mod works just fine for dedicated servers, at least from the US release.

Ive just spent my time writing an artillery system, not using the SOM, but the actual functions only to find it doesnt work online.

if ([mainArty, _pos ,'WP'] call BIS_ARTY_F_PosInRange) then
{
hint ""HAWK: PREPARING WP"";
[mainArty, true] call BIS_ARTY_F_SetShellSpawn;
[mainArty, 50] call BIS_ARTY_F_SetDispersion;
[mainArty, _pos ,['IMMEDIATE','WP',5,5]] call BIS_ARTY_F_ExecuteTemplateMission;
} else {
hint ""HAWK: UNABLE TO FIRE ON LOCATION"";
};

This works up to "HAWK:PREPARING" but then stops.
Ignore the double quotes, its inside an OnMapClick.

Any idea why this doesnt work on a dedicated server?

Im calling the script via a radio trigger which has onact:
wef = player execVM "smoke.sqf";

Could it be due to "player" being in there?
Note: Ive tried wef = [this] execVM "smoke.sqf";
Same effect, nothing.

Apocal
Aug 24 2009, 02:53
I just tried to use the Artillery from the SOM, works fine locally or in editor...

Is there anyway to get arty on a dedicated?

SOM does not work on dedicated servers. I've not tried any FO type script that replicates it's functionality on dedicated server.


Could it be due to "player" being in there?

Probably, but there may be other things going on there and I honestly am not the person to talk to regarding dedicated server issues.

Doolittle
Aug 30 2009, 21:25
Headspace, thanks for the cool arty!

Do you know why we get these errors when putting just a player and arty logic with gun on the map:

Warning Message: No entry 'bin\config.bin/RscTitles/RscArtyMap/Task.iconCreated'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/RscTitles/RscArtyMap/Task.iconCanceled'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/RscTitles/RscArtyMap/Task.iconDone'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/RscTitles/RscArtyMap/Task.iconFailed'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/RscTitles/RscArtyMap/Task.colorCreated'.
Warning Message: Size: '/' not an array
Warning Message: Size: '/' not an array
Warning Message: No entry 'bin\config.bin/RscTitles/RscArtyMap/Task.colorCanceled'.
Warning Message: Size: '/' not an array
Warning Message: Size: '/' not an array
Warning Message: No entry 'bin\config.bin/RscTitles/RscArtyMap/Task.colorDone'.
Warning Message: Size: '/' not an array
Warning Message: Size: '/' not an array
Warning Message: No entry 'bin\config.bin/RscTitles/RscArtyMap/Task.colorFailed'.
Warning Message: Size: '/' not an array
Warning Message: Size: '/' not an array

?

Apocal
Aug 30 2009, 22:24
Part of the 1.03 patch.

galzohar
Sep 4 2009, 09:41
In an attempt to fix my "clear the way" mission, I've been trying to make artillery work in MP without the SOM module (as the SOM module has serious bugs in MP - communicatino is not shown and thus it's impossible to tell what you need to do to call the artillery, and besides, SOM doesn't give much control over the missions), but had little success.

Problems:

- Battery takes time to become available after it finishes firing, and I can't seem to make the commands that check if it's ready/done firing to work properly. The BIS_ARTY_F_IsAvailable and BIS_ARTY_F_StillViable don't seem to work. Would be nice if there was a way to tell if the battery is ready to fire again yet or not.

- Missions are limited to the magazine capacity, even if there is an ammo box filling it faster than they are using it.

- Arty can only be called on the server, yet I need players to be able to call in the artillery.

- Can't make the laser guidance work. Placing "LASER" instead of "HE" in the template does not seem to do anything.

Relemar
Sep 5 2009, 16:09
hi, itry make my M270 MLRS shoot where i want them to

i really no sure, i read the artilley wiki but no use for me, i want it so i can request artillery on a traget i choose. i got my m270 x 3 lined up, and I synced it to the artillery module, now must I do what

galzohar
Sep 5 2009, 16:34
Lots of scripting that will ask the player for coordinates (usually via map click), and then call the arty fire function as shown in the wiki. And if you think it's too complicated, you're right.

Relemar
Sep 5 2009, 17:03
ok, well all I want is some artillery, just something simple where I can choose targets of my artillery, and its a Unlimited artillery (no run out ever0

do you think you can assist me with this, just maybe the cannon.. very simple artillery?? thx how to do :)

galzohar
Sep 5 2009, 17:37
You can try use cpbo and take the artillery from my "clear the way" mission, it's pretty clear which parts of the init.sqf and which scripts handle the artillery there. Though you may want to wait a bit for 1.11 where a small issue with it will be fixed, but the idea is the same.

vmaclan
Sep 5 2009, 22:22
Got this all working using the sample mission in the wiki!

I think the artillery templates are mixed up. I did a HE suppression fire mission and each gun fired 2 rounds. I did a Fire for effect fire mission the guns fired around 10 rounds + each. Check out this vid.

rwVqeNQCyBU

galzohar
Sep 6 2009, 02:42
The problem with the SOM artillery is that it bugs out on multiplayer.

Headspace
Sep 15 2009, 01:53
The problem with the SOM artillery is that it bugs out on multiplayer.

How, specifically? If you can demonstrate a clear repro, I can offer advice on how to resolve the issue.

galzohar
Sep 15 2009, 03:44
No radio messages when used for artillery (and nothing else) in multiplayer. The issue was present in previous versions of my "Co6 Clear The Way" mission, which is now fixed by simply not using the SOM module but rather scripting it myself, which actually seems to work better aside from the lack of a dialog (it only uses hints to ask you to click the map and tell you how many strikes you have remaining and when the mortars are available again, though again since I couldn't get the commands to work I had to simply time it and use sleep rather than actually check for when the battery is ready).

The issue was both on a dedicated server and hosted. Exact same thing worked in single player no problem.

Another issue is that if the leader is dead, the SOM module is no longer functional. With my script it's a radio trigger so it works just fine even when the leader dies (though a game bug seems to occasionally prevent passing the leadership when the leader dies, which is annoying).

Headspace
Sep 15 2009, 19:10
Can you link your mission.pbo so that I can see what you mean by the battery status functions failing?

galzohar
Sep 15 2009, 20:06
http://forums.bistudio.com/showthread.php?t=83272

Where I used sleep, it would be better to use waitUntil{function that works}; but i couldn't make it work.

As for the SOM version, I don't know if I kept the old version anywhere... But it's easy to re-create and see the issue ;)

THEBLITZ6794
Sep 16 2009, 00:50
m119 doesnt fire when using secops. 81mm works fine with secops. wtf

Major Woody
Sep 26 2009, 12:51
[["-->artillery_barrage<--"], player, [[RIPPER, [7,8,9]]]] call BIS_SOM_addSupportRequestFunc;
Is it possible to change this name? - I mean if I've several batteries and they are all named the same in my support menu it's rather confusing I think... ;)

galzohar
Sep 26 2009, 15:14
Is it even possible to have more than 1 artillery strike available?

{USI}_Zombie
Sep 27 2009, 00:52
Is it even possible to have more than 1 artillery strike available?

I haven't tried, but it is an interesting concept to try out. I will experiment and let you know, but why do we need more than 1 battery in the first place? That being said, I will try to work something out with each type of arty.

Ringhejm
Sep 27 2009, 06:36
Is it even possible to have more than 1 artillery strike available?

If you have diffrent names on the arty module and have diffrent radio trikker it should do the trick.

It works when the enemy is fire arty on you. I have made a mission where some morters are using HE on you and then a other arty ( D-30 ) battery is using WP at the same time. so if it works for the enemy it should work for you to.

But i havent test it. but try and se if that do the trick.

galzohar
Sep 27 2009, 10:24
I meant with the secops. Obviously you can have more than 1 battery, but I thought you wouldn't be able to add both as secops support option at the same time because of how the secops is made.

Winchester Delta_1
Nov 2 2009, 01:45
Thanks for the link for that artillery mission template : http://www.ofpec.com/forum/index.php?topic=33437.15

It worked almost perfectly for me. But I have one little problem with it that i can't fix. I only want to have 1 or 2 defined units to be able to call in artillery from the Russian side.

I have been searching all around the forums for this but could not find it. Is there a possibility that you already know the answer.

I am not really good at scripting.. So if it is possible can you give me a code to put in the trigger from that example mission on the OFPEC topic.

This is the only code in the trigger and it works fine with that. But i am creating a player VS player so i want only one side or one defined unit to be able to call in artillery:

hint "Left click on map to set target coordinates"; onMapSingleClick """target"" setMarkerPos _pos; [sch_arty, _pos, [""IMMEDIATE"", ""SMOKE"", 0.5, 15]] call BIS_ARTY_F_ExecuteTemplateMission; onMapSingleClick """";";


EDIT: the code from the template is included in the radio trigger.
Maybe its possible to create a action on any player i want to call in for Arty?

Maybe its also handy information when i tell i use Norrins revive script with it. Should it work when i die or respawn?

EDIT2:

I used the 1 setRadioMsg "Alpha Radio" in manny different way's by putting them into the init line of the units. But it didn't help. Also when i use 1 setRadioMsg "NULL" the radio trigger will disappears from all units. Not only for the units i put it in. Also when i sue TFA1 setRadioMsg "Alpha Radio" it doesn't work. What am i doing wrong.?

DokiDoki
Dec 13 2009, 07:25
Im trying to get the artillery to work with the SOM. I can call it in and everything but the Firebase is at my player character and not where the artillery is and thus they dont fire.

I have been looking at demo missions and at video tutorial but cannot get this to work whatsoever.

Does anyone have an idea how to get it so that the Firebase is at the artillery? At least I think that is the issue.

EDIT: Have copied over the template (or rather the triggers + SOM part of it) to my own mission and tried it again. Now the Firebase is at the artillery but still they dont fire. They give a confirmation and then idle. The template itself works fine.

Now also just now made the mission in Chernarus exactly like the demo and still it does not work, Firebase is at right position but still the artillery stands idle.

{USI}_Zombie
Dec 13 2009, 09:39
not sure I understand your problem, but it sounds like you a) either didn't name something correctly or b) didn't synch the arty module to the leader of the artillery.
Could you post your mission so we can help troubleshoot it for you?

DokiDoki
Dec 13 2009, 10:59
Yes sure, here it is:

http://www.2shared.com/file/9950238/77edabd3/testChernarus.html

Thanks in advance :).

{USI}_Zombie
Dec 13 2009, 16:29
the only problem I found was that you cannot fire near your location. It is inside the minimum range of the battery. When you call the arty and they tell you to "input coordinates", did you notice the red circle on the map? The red circle is the minimum range. I moved the battery far away and it fired as expected. Be careful using the MLRS, it has a very long max range and a very long min range.
If you want to use the MLRS, simply move it farther away from your intended target zone. You may not able to use the MLRS at all on UTES. If the precise placement of the battery is required for your mission, and you don't want it too far away, change the weapons to the cannons or even mortars. Just pay attention to the min/max range circles on the map after you call for the strike.
Hope this helps

DokiDoki
Dec 13 2009, 16:42
Aha! You saved me a ton of frustration. Thanks for that. I thought the red and green line were only firing distance :P.
I will try it out now out off the red line and then go on with the other arty.
This will be a ton of fun. Cheers!

Ronin =ASP=
Dec 20 2009, 15:47
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!

Major Woody
Dec 30 2009, 06:52
Refering to this this (http://forums.bistudio.com/showpost.php?p=1448565&postcount=215) and this (http://forums.bistudio.com/showthread.php?t=92650) I'll ask again... :)
Is it possible at all to change this line...?

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

granQ
Jan 22 2010, 00:15
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;
};

SGJackson
Jan 22 2010, 03:05
If anyone wants to make a SIMPLE artillery just take a llok at my post: http://forums.bistudio.com/showthread.php?t=94184
PD: IT TAKES NO SCRIPTS... I got a problem with the modules so, i gotta figguer out everything by the hard way xD :P
Best Regards, SGJackson!

Draper
Jan 24 2010, 21:16
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.

BD1
Feb 5 2010, 16:31
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!
http://www.youtube.com/watch?v=M8pR1rZZHEs

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

Charon Productions
Feb 7 2010, 23:59
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!
http://www.youtube.com/watch?v=M8pR1rZZHEs

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

Charon Productions
Feb 8 2010, 13:32
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 (http://www.sendspace.com/file/xe8mqk)

galzohar
Feb 8 2010, 18:34
I've had problem with the grad in 1.05 as well. Other artillery pieces do work fine though.

Charon Productions
Feb 8 2010, 19:34
I've had problem with the grad in 1.05 as well. Other artillery pieces do work fine though.

Thanks for confirming it, so the error is not on my side.

dingyisun
Feb 13 2010, 14:50
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.

Profanwolf
Apr 3 2010, 18:01
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?

galzohar
Apr 26 2010, 00:32
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.

zwobot
May 28 2010, 16:21
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.

galzohar
May 28 2010, 17:13
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.

zwobot
May 28 2010, 17:40
Yes, the waiting time is relatively small. I'm looking for a way to reduce it even more.

TechnoTerrorist303
Jul 25 2010, 10:47
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.

Evil_Echo
Jul 25 2010, 12:51
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?

TechnoTerrorist303
Jul 25 2010, 17:45
I've copied the scripts from a mission where they worked before Arrowhead. If I put virtual pieces down do they have minimum range too?

Shuko
Jul 25 2010, 18:52
I would imagine they have exact same min and max range that the unit they simulate has.

Dragon Zen
Jul 26 2010, 05:58
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...

Evil_Echo
Jul 26 2010, 14:48
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.

Dragon Zen
Jul 26 2010, 15:09
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".

Evil_Echo
Jul 26 2010, 19:25
The product is not yet "weaponized", will be soon enough. Meanwhile here is my original posting that others have used....

http://forums.bistudio.com/showpost.php?p=1654113&postcount=4

Here is the documentation for incoming shells...
http://community.bistudio.com/wiki/Artillery_Module#BIS_ARTY_F_ShellsInRadius

Dragon Zen
Jul 27 2010, 02:49
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.