Jump to content
Sign in to follow this  
Grim_Fandango

Making AI Shoot Over Wooden Fences

Recommended Posts

Hey guys, I'm trying to make a mission where soldiers have to defend a city against attack, and for that purpose I've set up some makeshift defensive positions using primarily the wooden fences in the objects menu.

Problem is, the soldiers behind the fences apparently don't see any line of fire beyond the fences. The enemy troops however do, and shoot them down like sitting ducks, but for some reason they seem completely unable to return fire. I've tried placing unarmed enemies at all distances to the fences, I've tried all stances and behaviours, but to no avail.

Is this a known issue, and is there anything I can do about it?

Share this post


Link to post
Share on other sites

It's a known issue and there nothing you can do about it.

What we need are AI-friendly sandbags.

In OFP you could solve this with setdammage 1 but in Arma the object simply disappears when you do that.

Setpossing the sandbag deeper in the ground helps a bit, but it's not a solution because the sandbags loose their purpose : providing hard cover.

I'm afraid we have to wait until the modtools are out.

Share this post


Link to post
Share on other sites

Also, even if you could get it working, that would be a bad idea since bullets go right through wooden fences in arma. Most of them anyways.

Share this post


Link to post
Share on other sites

I built a wall made by stacking six "Obstacle - Saddle" objects (looks like single row of cinder blocks) on top of each other.  You might need the editor addon for the saddle object.  The soldiers will shoot over this wall, although not until enemy is within about 50 meters it seems.  Here's a pic:

http://img49.imageshack.us/img49/5017/shootoverwallyb2.jpg

You build the wall by placing one Obstacle Saddle object where you want it, and then placing 5 more elsewhere, and put this code in the init of one of the 5 to stack:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this setpos (s2 modelToWorld [0,0,.13])

s2 is the name of the first saddle.  increment the height in the init for each subsequent saddle (i.e., .26, .39, etc.) another .13 meters, and then you've built a wall six saddles high.

To keep the defenders in place and crouched I use:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this setUnitPos "MIDDLE"; this disableAI "MOVE";

Share this post


Link to post
Share on other sites

There are actually lots of scenery items that the AI won't fire over, even with line-of-sight. This includes the standard "wooden fence" sandbags and even such things as fireplaces and traffic cones! I've also discovered that they won't shoot between the legs of the watertower *sighs*

As far as sandbags go, they can't fire over "wood fence" (straight section of sandbags) or "wood fence palet" (same as wood fence, but with a wooden pallet leaning against it), but they can shoot over "fence" (this is a sandbag corner-piece of a slightly different style than the previous two). You are a bit limited in terms of what you can build with corners, but at least you can have some AI-friendly sandbag emplacements.

[Note that I'm speaking here about 1.5 & 1.7 (both versions). I have my fingers crossed that the impending 1.8 might fix this, but who knows?]

Share this post


Link to post
Share on other sites
Quote[/b] ]...but they can shoot over "fence" (this is a sandbag corner-piece of a slightly different style than the previous two). You are a bit limited in terms of what you can build with corners, but at least you can have some AI-friendly sandbag emplacements.

Really?

I tried this with the last 1.07Beta patch but it doesn't work even when he standing up.

Share this post


Link to post
Share on other sites

OK, I had a test mission open and saw this behaviour while I was writing this post. Since you denied this would work, I rechecked and I can't replicate getting the AI to fire over "fence" at all! Unfortunately, I didn't save the mission that I originally used for the test. I'm going to try to replicate the situation later, but until I've done that and saved the mission for posterity, I have to concede that I must be mistaken. Very sorry to have got anyone's hopes up!

Talking out of my hat on my first post. Bodes well banghead.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  

×