Jump to content
Sign in to follow this  
General Barron

Indirect fire with infantry scripts

Recommended Posts

screeny6vs.jpg

I present to you all a set of scripts that allow you to easily force AI infantry to shoot indirect fire at a target location.

There are two levels of stuff here: there is a function that scripters can use to make infantry fire in their own scripts/addons (like "dofire" but for indirect fire). There are also three "wrapper" scripts included, which are scripts directly usable in missions. One script lets the player order his squad to launch grenades by clicking on the map; another makes a unit barrage an area with indirect fire; and the last makes the AI use indirect fire against all enemies in range (about 400m for BIS weapons).

The sample mission showcases all of these scripts. I recommend you look carefully at what is going on: you will notice the AI making very long shots that they normally won't take with grenades, among other things.

This will be permanently hosted at OFPEC once it comes back up.

Addon required: Lester's invisible targets; included in the download.

Important: Read the readme! Also, be sure to check the "known issues" section for a list of known bugs... er, features. smile_o.gif

About the image: No, you won't see that ingame. The graph is of the one of the surfaces fitted to some of the sample data I took, which is the equation underlying the scripts. I'm just trying to make math look "fun", which we all know it is not. biggrin_o.gif

Download link:

http://rapidshare.de/files/18386331/inf_IF_1_0.zip.html

Share this post


Link to post
Share on other sites

Wow I miss my computer so much now this sounds so interesting after I read the readme. I realy want too try it out but unfortunetly I can't at the moment. but I am realy looking forward too trying this.

STGN smile_o.gif

Share this post


Link to post
Share on other sites

Word on the street is this works really well

Cudos General Barron, very nice work indeed  biggrin_o.gif

Share this post


Link to post
Share on other sites

It doesn't work for me, i highlight a grenade unit select Order indirect fire and alt click on map which says unit watch direction. And comes up as negative.

huh.gif

Share this post


Link to post
Share on other sites

the british use a sustained fire weapon, which has a dual role of direct fire, and indirect fire using a C2 sighting system (think artilery with 7.62) - could these scripts be integrated into an addon to succesfully simulate this?

Share this post


Link to post
Share on other sites

Tried it and it works fine.

I finished the mission and I noticed that the support squad was still firing their grenades...

I couldn't see them cause my screen went black (outro) , but I could hear them firing even when all enemies were dead.

Do they ever stop GB?

Share this post


Link to post
Share on other sites

i dont understand wat muzzle is?

is it the muzzle of the weapon in the config of the weapon?

Share this post


Link to post
Share on other sites

Wow, DLing now, I`ll try it asap!

(waiting for handsignals update inlove.gif )

edit: strange, I have the same problem as Law-Giver...

I tested it on ffur06 and ECP...

Share this post


Link to post
Share on other sites
Quote[/b] ]It doesn't work for me, i highlight a grenade unit select Order indirect fire and alt click on map which says unit watch direction. And comes up as negative.

I should have pointed out that if you try and tell them to target something that is out of range (or otherwise in-targetable), they will reply with 'negative'. BIS grenade launchers have about a 300m max range on flat ground (not that far). Most 3rd party launchers will fire almost twice that distance. Try getting closer to the action.

Quote[/b] ]i dont understand wat muzzle is?

is it the muzzle of the weapon in the config of the weapon?

Yes, the muzzle name can be found in the config of the weapon. Better yet, in the readme there is a line you can put in the init field of a unit, which will tell you the muzzle name when you fire:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">hint format["Magazines = %1", magazines this]; this addeventhandler ["fired", {hint format ["Muzzle = %1\nVelocity = %2 m/s", _this select 2, 0.27777777 * speed (nearestobject [_this select 0, _this select 4])]}]

Quote[/b] ]just curious however is it MP freindly?

No idea on that one. My *guess* would be that it would work fine when executed where the units are local. I've got no way to check atm though.

Quote[/b] ]Do they ever stop GB?

Heh, there are like 10 of them, with 3 grenades each. They stop when they shoot all those grenades smile_o.gif.

Quote[/b] ]the british use a sustained fire weapon, which has a dual role of direct fire, and indirect fire using a C2 sighting system (think artilery with 7.62) - could these scripts be integrated into an addon to succesfully simulate this?

Hmm... could you provide some links to info on this? This should be possible, although the limited lifespan of bullets in OFP might limit it. Would require modifications to the scripts, but I might be able to do it.

Share this post


Link to post
Share on other sites
Quote[/b] ]the british use a sustained fire weapon, which has a dual role of direct fire, and indirect fire using a C2 sighting system (think artilery with 7.62) - could these scripts be integrated into an addon to succesfully simulate this?

The British L7A1 GPMG, or FN-MAG/58, KSP-58, C-6, M-240B / G, etc, on a sustained fire mounting with the C-2 optical sight and the like is capable of indirect fire, to clarify the above quote. Also, M-2HBs in Canadian service* with sustained fire equipment are also capable of indirect fire.

I too am interested if these scripts could be integrated into an addon to simulate indirect machinegun fires.

* - Granted, all MMGs and HMGs are capable of indirect fire as well. Just that the Canadians happened to be a major force in the development of machinegunnery, and I don't believe other nations use the HMG in a indirect fire role. Unfortunately the CF disbanded the Machinegun School and so gimped our gunners. Bastards. Sorry, that kind of slipped out.

Share this post


Link to post
Share on other sites

I want to know if it´s possible to make indirect fire with aircraft. If I'm a Foward Air Controler and have some AI planes to comand I want to make a strike call by clicking on the map. The same to a mortar or artillary.

G-LOC

Share this post


Link to post
Share on other sites

G-LOC. Read what it says on the tin.

There are close air support scripts and artillery addons out there. Go find them.

Share this post


Link to post
Share on other sites

this system is a great idea, but Im having a problem with the mission. It seem that there is a sweet spot in which the troops will engage. I get alot of negative actions by my squad depending on where I move them. Its hard to find the location in which they will engage. the nme on the other hand will engage with deadly accuracy. It tried to use this with wgl and sure enough it doesnt work because the gl's in wgl are porked.

Share this post


Link to post
Share on other sites

great!...

two weeks left then i am home.

Is it OK to include this in a addon pack with soldiers?

and i checked your readme but not sure about this, but what you think about making lets say a mortar, 60 mm or 81 mm..

then my idea would be to replace the inv target with a visual yellow thing for player gunners, then you get in Mortar as gunner, press "Select target", a yellow ring shows where to aim the mortar (not visuall if you not gunner in the mortar) you take the scope, aim on the yellow thing fire and hit the enemy base or whatever you fire on.

Share this post


Link to post
Share on other sites
Quote[/b] ]C-03

The C03 Commando Mortar with a range of 1000 m, is operated by one man. This weapon is designed for Commandos and Paratrooper Units in close combat. This simple, user friendly, highly effective weapon is ideal for urban and very close assault and support missions. A considerably short barrel is attached to a small, spade type, baseplate.and there is no bipod. The Trigger mechanism incorporated in the breech enables direct,flat trajectory firing. A sight is clipped to the barrel, indicating the elevation directly, according to the desired range. Weight: 7 kg.

60mm.jpg

this one i wish to make, before i start, you think your equation can be used with this one?

Share this post


Link to post
Share on other sites

Even though I hate to dig up old topics I need to ask for a fresh mirror to this script!

Would anybody be so kind?  confused_o.gif

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  

×