Jump to content
Sign in to follow this  
Opticalsnare

AI Force Fire Script?

Recommended Posts

Hey guys i was wondering if it was possible to have the AI force fire their weapons on a postion even tho there might not be an enemy target there... I wanna have them blast the shit outta of a town with some 50cals and tank guns, is this possible?

Edit: I think ive found it

http://community.bistudio.com/wiki/fire

Well i got a M2 to fire but only one shot confused_o.gif

Need to make like a "suppresive fire script" or something with like 100 rounds in 25m radius in full automatic fire..

Thanks inadvanced.

Share this post


Link to post
Share on other sites

The new mapfact addon has invisible targets that can be fired upon?

giving the effect!

look in addons & mods complete thread! smile_o.gif

Share this post


Link to post
Share on other sites

Yeh that works perfectly thanks dude. smile_o.gif

Hmm it works pretty good at semi-short ranges but something like 500m it just wont fire it aims at the target but wont fire, this is what ive done so far to a Abrams tank

Quote[/b] ]Abrams01 doTarget Target01
Quote[/b] ]Abrams01 doTarget Target01; Abrams01 fire "M256"
= fires in random direction once..

I think im missing something..

Share this post


Link to post
Share on other sites
Quote[/b] ]I think im missing something..

The Tank first needs to "see" the target.

Therefore use either "knowsabout" or "reveal" in the init line first.

Check the syntax in the biki.

You can of course make the tank fire the weapon without having invisible targets implemented with a script.

Most users prefer addonfree missions as it gets a major pita when you have to install addons for every mission you download.

Little excerpt from scripts I used to have AI shoot on specific objects:

#loop

a3 fire ["browning","browning"];

~0.1

a3 fire ["browning","browning"];

Goto "loop"

The ~0.1 delay has been replaced by Arma with a different syntax. Check Biki for "wait" command I guess.

This makes the unit fire the weapon. Replace "browning","browning" with your weaponname and ammoname.

Place some objects that you want to have "attacked" and use something like this to make the unit fire at the desired region:

#loop

~1.5

q4 setdammage 0;

a3 dowatch q4;

q4 setdammage 0;

~1.5

q6 setdammage 0;

a3 dowatch q6;

q6 setdammage 0;

~1.5

q8 setdammage 0;

a3 dowatch q8;

q8 setdammage 0;

~1.5

q5 setdammage 0;

a3 dowatch q5;

q5 setdammage 0;

goto "loop"

Again the ~ commands have to be replaced. This script basically makes the unit strafe the area covered by the "q" objects. If you place them right the gunner will switch between the targets while he constantly fires.

You can even extend that by rearming the weapon if the ammo runs low with a script so you have infinte fire on the desired region without any addons.

Share this post


Link to post
Share on other sites
Quote[/b] ]Abrams01 reveal Target01; Abrams01 doTarget Target01;

Still no fire ive been in as gunner i get ordered to target but not to fire.

Quote[/b] ]Abrams fire "M256"

Does the same thing as before he just fires off to his side, not on the selected target.. sad_o.gif

Share this post


Link to post
Share on other sites

Try this

Quote[/b] ]Abrams01 reveal Target01; Abrams01 doTarget Target01; Abrams01 doFire Target01;

Share this post


Link to post
Share on other sites

Yeh tried that too think im just gonna edit the config files and increase the engage range more.

Its like they just wont fire from a distance of over 450meters.. 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  

×