Jump to content
Sign in to follow this  
policebear

How to Script AI To "Talk Guns" With player

Recommended Posts

So, in operations involving the need of suppressive fire, whether it be from the mounted gun of a HUMVEE, or a gunner. I was wondering how/if it would be possible, for every time I fire off three rounds, the AI then lay down ten, and every time I lay down three, they follow up with ten suppressive rounds in the direction I'm firing. 

Share this post


Link to post
Share on other sites

I realize that you might not have a lot of experience with scripting in Arma, however here is a little snippet that I cooked up:

_state = [(weaponState soldier) select 1, "FullAuto"];

soldier doTarget player;

sleep 1;

for "_i" from 1 to 30 do
{
	soldier forceWeaponFire _state;
	sleep 0.101;
};

I don't have much time to expand on this, so I'm just going to dump it and see if anyone wants to go from here. To use that code, start a new mission and place a player and another (friendly) rifleman. Give him the name "soldier". Create init.sqf and copy and paste that code in it for some fun FF.

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  

×