Jump to content
Sertica

Making Crew Fire Any Artillery

Recommended Posts

The idea is to use doArtilleryFire or BIS_fnc_fireSupport (what is the difference?) in a method that works for any artillery class vehicle.  I need to get a reference to the available artillery type gun magazines starting with knowing only the group in the vehicle.  So suppose I have the group handle "_crew".  I guess I start with assignedGunner.  Then what?

Share this post


Link to post
Share on other sites

Could you say in what context you want to use that. You're starting with the BI command/function (using commandArtilleryFire)  but your aim seems to be the filter for magazines....

Anyway, artillery are vehicles with specific classes you can filter by:

(vehicles select {getText (configfile >> "CfgVehicles" >> typeOf _x  >> "unitInfoType") == "RscUnitInfoArtillery"});

then:

_mags = magazinesAllTurrets anyArtilleryFromListAbove;

will return the mags. You can specify for gunners:

_mags = anyArtilleryFromListAbove magazinesTurret [0];   ([0] is usually the turret of the gunner)

 

The question is: what do you want to do with that?

Share this post


Link to post
Share on other sites

Artillery units in a pool are on standby to fill orders as they come in to pound spotted players.  It's part of the same routine as the attack heli response I posted about before, except this will get pumped into forests.  Each vehicle type prioritizes different types of target terrain.   So I suppose I can check whether the vehicle is RscUnitInfoArtillery, then get the magazines from the the gunner index.  How does the command deal with the shell already in the chamber?  What happens if wrong shell type is in chamber?  What is the difference supposed to be between the doArtilleryFire, commandArtilleryFire and BIS_fnc_fireSupport?  In func viewer it looks like BIS does more complex stuff on top of the other command.

Share this post


Link to post
Share on other sites

doArtilleryFire and  commandArtilleryFire  are almost same. command here means radio order.

Bis_fnc_fireSupport is using commandArtilleryFire and more parameters. Not sure that worth it for your goal.

 

See also getArtilleyAmmo

You can change shell by loadMagazine prior to fire it.

Mind for syntax on these commands. A turret is usually [0] or [x], sometimes [x,y] for commanders... see also currentWeaponTurret... currentMagazineTurret and the whole family by links.

 

The efficiency on targets (or rather the usage made by AIs) depends on the fire shell, so the ammo. In Arma, ammos are categorized by figures in cfgAmmo (aiAmmoUsageFlags).

So, if you know in advance what are the configs for magazines / ammos of your turret, you can select (loadMagazine) the right shell for the right effect on target.

 

 

Share this post


Link to post
Share on other sites

To the OP, I read your and I have to presume that you are trying to get artillery, controlled by the AI, to fire on you and other friendly players.

People have had no end of trouble with this.

An other solution, is to use artillery shells, or mortars or aircraft bombs, and have them explode near you or away from you at random.

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

×