Jump to content
Sign in to follow this  
Blanco

AI_cover2.0

Recommended Posts

This script puts units in a defensive crouch position. This will make them more effective when you put them behind windows or other obstacles (trenches)

To execute the script:

1.

-Set up east/west/resistance present triggers to specify enemy units with the following conditions:-

-East/West/Resistance present (whichever side is to be considered the enemy of the side using the AIcover script)

- Once

- Name : whatever you like. (eg : eastunits)

- Size and shape to cover the entire mission area

- Condition : this

- On Activation :

2.

- Place a group or individual unit on the map (you don’t have to name it)

- Put every unit in the desired position and direction.

- Every unit MUST have “None†selected in the special menu!

3.

Run the script by following parameters (in the init field of one of the units of the group)

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[“initâ€,this, name of the trigger for the enemies] exec “Aicover2.sqsâ€

Example :

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[“initâ€,this, eastunits] exec “Aicover2.sqsâ€

Note : Don't give the group or unit any waypoints.

Recommended but not required :

Sanctuary's animation pack 1.7 All players on the server MUST have the anims or OFP will crash)

The Sanctuary’s crouch animation is much more stable (in terms of balance) than the BIS version. Each time a unit stands up or turn  he will shuffle a few centimeters to the left or right.

This can cause serious trouble because the unit will end up next to the obstacle or window after a while!

Actually, I strongly recommend Sanctuary's anims, I had much better results with them.

The script was not tested in MP, but I really really really hope it works because AI units are far to stupid to fight against them.

Please someone, test this in MP!

AICover2.0 demo

Share this post


Link to post
Share on other sites

Down loaded it. Can't try it on MP for you, but like idea. The IA is quite floored in that is just goes prone at the first sign of danger even if it's in a building or behind sand bags.

This script should prove usefull, thanks.

Share this post


Link to post
Share on other sites

With the script the AI will crouch-stand, when he got hit in the legs or run out of ammo, the script exit and the unit will move into a random position within a radius of 100m. This prevents he will go prone and clip with walls or other obstacles.

The unit will watch in the direction you put him on the map, but he will pick and face the "mostknown" target in the field.

So he will not be focussed and watch one direction only.

When the target is closer than 50m, the unit will pick the closest target (but he allready has to know he's around somewhere, so you can still sneak upon him, but you have to be really quite))

So basically :

- He chooses longrange targets depending on Knowsabout

- He chooses shortrange targets depending on distance.

It's quite effective smile_o.gif Try the demo, it's really hard to defeat them.

Share this post


Link to post
Share on other sites

cool script, will try it, i maybe can get some friends onver on saturday for  short lan test of my latest mission in the works, and i can also test this script in mp too see if it works  smile_o.gif

edit* also wonder if it works with editor placed buildings?

like if i have put out some mapfact watchbaracks with soldiers inside will they be able to take advantage of the script or not?

Share this post


Link to post
Share on other sites
edit* also wonder if it works with editor placed buildings?

like if i have put out some mapfact watchbaracks with soldiers inside will they be able to take advantage of the script or not?

As long as the unit can see over or through the obstacle (window), there should'nt be any problems with editor placed objects. Some obstacles must to be destroyed first (like a sandbag)

On the other hand, I think the rail of a mapfact watchtower is a bit too high. The unit can't see over when crouched. (not tested tho)

I can modify the script so you can choose between crouch, stand or prone...

Share this post


Link to post
Share on other sites

Doesn't seem to work for me. The soldier goes prone at the start, then crouches for a few seconds, and turns around in circles a few times and then targets ME!

The example mission worked wonderfully, but not in my mission. I set it up right and everything. I don't know what to tell ya... smile_o.gif

Share this post


Link to post
Share on other sites

Swatdog, check your pm.  rock.gif

I've tested this thing a million times in SP, so I wonder what you did wrong.

PS : It's normal he goes prone at the start.

Share this post


Link to post
Share on other sites

Could someone kindly post a copy of this script for download? The links are no longer working.

It's a "must-have" from the description that I read, and so my interest in the demo is enormous.

Thank you!

:)

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  

×