Jump to content
Sign in to follow this  
headspace

ArmA 2's Artillery Module

Recommended Posts

I believe it would help you get around the killed event handler problem, but as I said you would need to do some book-keeping.

Share this post


Link to post
Share on other sites

I'm sorry... What is the mean of "book-keeping"??

Coming from China, I'm sorry for my english...

Share this post


Link to post
Share on other sites

book-keeping = maintaining a list of values.

He maybe means you would have to create new variables to keep track of who shot an artillery shell than compare it's target with recently dead units or something? :)

Share this post


Link to post
Share on other sites

OK thx. My friends suggested me to try this way too. Nn, I'll try this, though it don't be very precise.

Share this post


Link to post
Share on other sites

When trying to use an artillery piece with the targetting interface, I've noticed - at least in the editor - that unless a player gets into the gun ASAP at mission start (within 5 seconds or so), then the interface won't initialize. Any thoughts on this?

Share this post


Link to post
Share on other sites
When trying to use an artillery piece with the targetting interface, I've noticed - at least in the editor - that unless a player gets into the gun ASAP at mission start (within 5 seconds or so), then the interface won't initialize. Any thoughts on this?

Never experienced this, however didn't test it much in the editor; as long as it works elsewhere is good enough I guess.

As long as you aim high enough and the artillery piece was already in the game by the time you join, JIP or not, it have always worked for me. And if adding the piece during the game just run the Arty init command then it will work for all.

Share this post


Link to post
Share on other sites

Could work outside of the editor, not sure. I'm just finding that when I teamswitch from a distant unit to the artillery gunner, unless it's done fairly quickly after mission start, no targetting interface is available. Will try in a dedicated MP setting later and see what happens.

Share this post


Link to post
Share on other sites

If description.ext has respawn=SIDE; then you can teamswitch in MP, but most missions don't use that, and it has some minor bugs.

Share this post


Link to post
Share on other sites

Thanks for the info guys. It seemed to work perfectly in a dedicated which was all I wanted anyway ;)

Share this post


Link to post
Share on other sites

Somewhat late post,

I am useing this setup that was posted by dave earlier in this thread:

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

I can get it to work in the editor, and when you make an mp server, but I have a game server with

defcon servers for Arma 2, and i put my mission on the server, it runs no problem,

but when i call for the art from the radio or the comm menu the message at the top right for the hint dont show up.

Does this module work on a server,

or do I have to wait for something to load or initliize?

Im not getting why this wont work on a game server, it works everywhere else, anyone know why?

edit

it dont work on a game server.

Edited by Gnter Severloh

Share this post


Link to post
Share on other sites
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

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

Did this using USMC M252 mortars with the leader as a Lieutenant, but it fails out with "Out of Range" and a script error like this:

Execute Template Mission

Error Generic Error in expression

If (glbbattery |#|getvariable "ARTY_BADTARGET")then

2\missions\MortarTest.Brik\FireMission.sqf

Error getvariable: Type String, expected namespace, object,group,control,team

And it gives a HUD feedback of "Out of Range"

Any ideas what is wrong ?

Share this post


Link to post
Share on other sites

when i use the arty module (virtual or a RL battery) (i even gewt it only the SOM (no arty module) arty) i get the following error .. displayname/' is not a class ('arty_ballistics'accessed) any body know what it is ?

Share this post


Link to post
Share on other sites

Well folks, I 've been trying for three full days to make the artillery work, following the you tube tutorials and the online tutorials.... nope. Reading this tutorial I realize you'll need a masters degree in computer sceince to make it work.

It's a nice game looking at the graphics, for the rest it's much too difficult to make it work.

PS I am trying this in ARMA II arrowhead.

Regards, DJH

Edited by pzgr40

Share this post


Link to post
Share on other sites
Well folks, I 've been trying for three full days to make the artillery work, following the you tube tutorials and the online tutorials.... nope. Reading this tutorial I realize you'll need a masters degree in computer sceince to make it work.

It's a nice game looking at the graphics, for the rest it's much too difficult to make it work.

PS I am trying this in ARMA II arrowhead.

Regards, DJH

It is hard for us to help you when we don't know what your trying to do. Please post the code you have so far and maybe we can help.

Share this post


Link to post
Share on other sites

Does the Virtual battery and Secop method work for MP missions?, I'm trying to add it to one specific player and it appears to work up until the battery fires then arma CDT's every time.

Share this post


Link to post
Share on other sites
Did this using USMC M252 mortars with the leader as a Lieutenant, but it fails out with "Out of Range" and a script error like this:

Execute Template Mission

Error Generic Error in expression

If (glbbattery |#|getvariable "ARTY_BADTARGET")then

2\missions\MortarTest.Brik\FireMission.sqf

Error getvariable: Type String, expected namespace, object,group,control,team

And it gives a HUD feedback of "Out of Range"

Any ideas what is wrong ?

Sorry for half/resurrecting this topic but I have tried the same thing and got the same result. I was looking for a repeatable mortar support without using Som (avoiding the specops missions etc) and with this method all I get is the out of range message popping up every time I indicate the target.

Share this post


Link to post
Share on other sites

You can disable secops missions in the SOM module (sorry I don't remember how, you'll have to search). Of course that doesn't stop the SOM module from causing all other kinds of bugs...

Share this post


Link to post
Share on other sites

I've been really lost on trying to make a SIMPLE mission- and despite coding in some languages- following that BIKI's instructinos is not dummy proof- seriously.

So, looking at all the nightmares of explanations in this thread- we need a Step by step guide for a basic few things(FOR A2 and then one for Vanilla OA ,since there's differences that many may not be aware of)

I only have/use Vanilla OA

There's so many ways to do it- I've got one down- but it's NOT what I'm looking for.

Way I managed to use cough "artillery" cough

Pick a map- put a infantry person on the map. Set him as player.

GO to Modules(or use F7), place one down, go to the top menu- scoll to simple support module- select it.

Now, select Synchronize or use F5 to select it, then sync your char with that Module. BAM.

Now start the mission- and the Module handles everything- go to your communications menu, via hitting zero, or even the spacebar- select Communication- and you can now request Arty support among others.

Pros: Easiest way to get support, arty wise

you just slap down your guy, a module, and bam you can call arty

no scripting involved in this one

cons. #1. It uses ...virtual, I'm guessing- as the arty shells come from nowhere. This is a negative because you can't use this to get a friendly AI MLRS, GRAD, Mortar, or whatever(in your group or NOT in your group) to shoot where you want arty fire to be shot at

#2. It gives you more than jsut the arty option- I know a lot out there will view this as a negative..

-----------------------------------------------------

Note: The above I did in OA.

-----------------------------------

Something else you can do in OA is put a player person down, put , say, a MLRS in your group(under your command)- then you can hit spacebar and see the fire on position command. USe it, and your allied unit/s in your group start shooting a few shots at whatever target- provided it's not too close. That's another way to do it

------------

Now, that's the limit of what I can do that ends up working

------------

What I want to learn how to do is this(Biki left me confused/with a ton of nonworking tricks)

Using just the init fields in the editor for any scripting required- I want to be able to

#1. Place a man down somewhere- lets have him be the player. He's going to call in the strike. He can be anywhere, either right next to the arty units or far away on a mountaintop using his binocs looking down on enemy tanks

#2. Somewhere REALLY far away(since the MLRS/GRAD vehicles have such a stupid-long mimimum firing range), slap down a bunch of MLRS or GRADs. Hopefully, they are FILLED with AI and not empty vehicles, if possible. Hopefully, they do NOT have to be in the same group as the player(but if i want them in the same group- nothing stops me from doing so)

3#. that spotter man Being able to use ...the Commuication menu to request THOSE artillery units to fire where he wants them to. And what type of round aka illumination* (*if this is too complex, scrub it for a later tutorial)

Then the actual physical artillery units get to work and start blasting away. And hopefully not runnning out of ammo too quickly in the process

One final question. Am I right in guessing that (lets use the above example of a player looking down from a mountain on some tanks he wants to kill, with friendly AI artillery units somewhere Far away in his group, or not in his group) there's no way to get this to work so that if the mountainman calls for arty , and a 2nd HUMAN player is in the MLRS/GRAD as gunner - he can somehow proceed to do what the AI would have done if he wasn't in the vehicle, and see and then target where the mountain guy wanted, and then shoot the MLRS/GRAD?

Because I've read this whole thread, and I'm seeing a lot of ...MP issues as well

This is why in the real world, whenever you code something up, you dummy proof it. Or if you teach someone something, you make it so they'll never get truly lost for long. The Biki really could use more examples and more details in the "step b steps" it does try to give.

///////A confused Coder

Share this post


Link to post
Share on other sites

Generally if you want that level of control over artillery you either A) make it entirely player based. Just plop down your arty and tell your friend to get in or B) Use a 3rd party arty solution. There are several very robust arty scripts available or C) just make the whole thing virtual. Hack up some Communication menu options for dropping whatever you want on whatever you want.

Making AI spot for Humans though is a little bit difficult, but I've seen a "Forward Observer" script but it was for adding arty to the enemy AI, not for players.

Share this post


Link to post
Share on other sites

I need to set the limits (min/max) for my arti. is it possible to set the maximum range for mlrs ?(i need to target 8 to 10 km away but the mlrs max is only 3km)

i found nothing for set the min/max.

thanks

Share this post


Link to post
Share on other sites
No you cant set them, unless you create a new addon that overwrites their ranges. But your wrong on your ranges of the MLRS, see here:

http://community.bistudio.com/wiki/Artillery_Module#BIS_ARTY_F_LoadMapRanges

the table says "MLRS M270 Multiple Launch Rocket System HE 4900m - 15550m", but i get circles about 20-50 meters away from mlrs that i use and when i fire says warning and i cant fire anywere.

if not click for target and press fire immediatly on arty computer, then the mlrs fires but the eta is 88 and at the end of 88sec no explosion, no nothing. (like dummy missile)

Edited by dragonsyr

Share this post


Link to post
Share on other sites

the mlrs has a HUGE range limitation, the best map to experiment on is chernarus from the corners of the map,

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×