Jump to content
Sign in to follow this  
Ice_Rhino

Friendly AI Grabbing Nearest Weapon

Recommended Posts

Hi All,

I wonder is there a way to automate two recently freed BluFor hostages

(this setCaptive false);

to find and arm themselves with the nearest Primary Weapon from dead soldiers, be it BLU or OP dead soldiers. I know if they are in your group you can manually do it with the Inventory I was just hoping that the AI could do it for themselves.

Thanks

Share this post


Link to post
Share on other sites

Hey Ice

I am thinking something l like this.

Check for nearest "dead unit" then fill an array with the weapons (also count) and magazines (also count) they have. Then select a weapon at random and add the magazines that match the weapon. Then remove the hear from the dead unit so there are no extra guns added. There could also be a bit of scripting to make the civilian walk to each body and crouch to get the gear.

Not at home. Also on phone so can't help with actual script right now but hoping this will be a good start.

Share this post


Link to post
Share on other sites

Might look up some of the AI mods for ArmA2, like Robalo's and Zeus'. Those had AI rearm I believe. I thought the action Rearm would work, but didn't in tests earlier.

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  

×