Jump to content
Sign in to follow this  
maddogx

AI suppression fire script

Recommended Posts

Hey guys,

yeah it's me again. Here comes another self-made ArmA script - this time for AI suppression fire. I've basically been scripting all day (see my Explosion FX from earlier).

View a demonstration video here: YouTube - MDXsuppFire Demo

If you're interested in trying it out, I've uploaded the current version (1.01 BETA) to FileFront:

FileFront.com: Download

I've included a small readme, but I couldn't be bothered to write up a detailed description on how to use it. There is a demo mission included though.

By the way, special thanks to Matt Rochelle for giving me the idea.  wink_o.gif

Any feedback is welcome of course.

Share this post


Link to post
Share on other sites

Hey MadDogX,

well if you are interested in thouse thing's you should check out Solus SLX Mod.

Solus is the Master of Effect's and improved Script's.

I uploaded a beta of Solus ArmA SLX Mod ( Effect's only ) but there is a version avalible with Suppressed fire, Wind, Smoke, Fire Damage and Wound effects.

Just check it out:

SLX Mod

Share this post


Link to post
Share on other sites

Hello,

I am a complete newbie at Arma, the editor and just computers in general and i wondered if you could please explain alittle more how this works help.gif

Does it change all the AI in single player to use this? (thats what i'm hoping for)

Or does anyone know a program(script?) that would make the single player (or co-op version) AI use suppression?

Also slightly off topic but could someone please give me a link (if one exists) to a guide on how to control your squad?  I have read the ones on the main page, was just looking for one with abit more indepth about when to use the different orders.

Once again, sorry for the silly questions i'm just trying to grasp afew new things here smile_o.gif  I've been searching for quite awhile for answers but sorry if all this has been asked alot and i missed it.

Thanks for any help in advance,

Bracken.

Share this post


Link to post
Share on other sites

Nice! And the explosionFX is also looking good. Would be nice to see all these in 1 ultimate mod someday.

Share this post


Link to post
Share on other sites

Downloading and will check it out tonite smile_o.gif

Share this post


Link to post
Share on other sites

Cool, trying it out now. smile_o.gif

Check this out too.

Second wrote:

Quote[/b] ]I just made small suppression script... When bullets fly near, guys hit ground, start for look cover, their skills (hand shaking and aiming accuracy) drops to bottom... Not hard infact.

When having more time, i could improve it... But i should be working on something else or GrimErazer is going to kill me

BIS should do something about that 'Take Cover'-thing... I don't know what is wrong with it, but guys act as they couln't deside is this better cover or that next one. Or then 'move' messes with 'take cover' and so for every ~second they try to move and seek for cover?. Any one else has better clues?

Share this post


Link to post
Share on other sites
One simple question:

Do the people being suppressed take cover?

I didn't notice that in .SQF, although i haven't tested it in game... I have one (under work) which models supression, combined with this ... inlove.gif

One other colonel just convinced me to finish it and the thing i should be doing takes little bit more of thinking, suppression-issue is good relaxing project.

Share this post


Link to post
Share on other sites

Yes, this script is not modelling the effects of suppression in any way, rather it is encouraging the AI to fire supressively (specifically by being forced to fire, even when they don't think they have a killshot). The AI will only fire at a target within a mapper-placed trigger zone and it assumes the firer is unable to move and that there is no possibiliy of friendlies being between the firer and its target.

There is a pretty severe bug in the 1.01 version of the script, acknowledged in the source code, which means that it only works for some hand or vehicular weapons. The example mission utilises the static machine-gun, which is not greatly affected by this problem, which causes the weapon to point directly upwards just before it is fired.

To fix this, change in MDXSuppGunner.sqf (line 28):

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_gun fire (weapons (_gun) select 0);

to

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">proxyActor action ["useWeapon", vehicle _gun, _gun, 0];

Note: "proxyActor" is a GameLogic you've placed in the mission. Code also assumes that the primary (#0) weapon is the one being used for laying down suppressive fire (in both versions).

Inspired by this example, I have invested a little time creating a (very slightly) improved script, using a slightly different methodology, since I want to have a more generic script, rather than having a static firer firing on a known area. I'm hoping that 1.08 with its nearestTargets function will make life a little easier to move forward. The big benefit of using this function is that the scripter has access to the perceived, as well as actual, locations of enemies, so that the target location can be less arbitarily determined (so far, both my and maddog's scripts fire at a random position near the true position of the target).

Another big issue is to check the line of sight between the firer and target. Although it is reasonable to fire suppressively if the target is directly behind hard cover (either hitting the cover or just missing it), it isn't reasonable to fire if the target is blocked by an obstacle closer to the firer. I've seen some discussion about line-of-sight on this forum which seems to think that checking every couple of meters with nearestObjects (and then checking bounding boxes) is the best way to do this and maybe I'll look into that.

Also need some heuristics to decide when to fire suppressively and perhaps to encourage half of a squad to suppress while the rest advances/outflanks/retreats. This is a bit more advanced than I can get my head around for now, but without it, suppression doesn't really have much practical use. Perhaps a compromise could be that the AI could be commanded to suppress while the played members of a squad maneuver?

Don't know if MadDogX is still working on his script? Since I'm new here, I don't know what the unwritten rules about grabbing someone else's base idea and running with it are, so I won't post any code other than the above bugfix for now. Hoping to at least reopen discussion on this investigation... wink_o.gif

Share this post


Link to post
Share on other sites

Hope that fixex come shortly after the patch 1.08 release in a lot of scripts and especialy this one :-)

Share this post


Link to post
Share on other sites

Spooner, please make a better version out of this!

It would be nice if all kind of AI-controlled enemy could decide to use supressive fire against the player(s) - of course Machinegunners in static, tanks, choppers, cars and even the mobile ones (m240, PK, m249) should use it more often. (thinking about coop-maps).

Regards, Christian

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  

×