Jump to content
Sign in to follow this  
Robalo

Self-arming AI

Recommended Posts

I'm working on a script/addon to make the AI automatically grab weapons when needed from the obvious places. I wish they would do this by default, they do it often in missions when the group leader is AI but not always and not when a player is in command.

With the excellent VFAI addon, which inspired me to do this, they are able to loot the dead bodies but not the more obvious places like weapons or crates near them.

What it does right now:

If a soldier has no primary weapon he will look around for one. He will check the weapons dropped on the ground or the crates for his default weapon first, then for any other weapon available.

What it should do further:

- If default weapon not found, sort the other choices favoring the unit's class, so a sniper will look for sniper weapons first, a machinegunner look for support weapons etc.

- Apply same logic for AT weapons and handguns.

- Micro-tweaking, look for magazines and other items.

Here's a video preview:

H_P28teop0M

Question for scripting gurus:

How can I script a move order and prevent the AI shouting "READY","WAITING" etc. ?

Edited by Robalo_AS

Share this post


Link to post
Share on other sites

Looks great...

I'll try it and give some feedback..

Thanks for sharing

Share this post


Link to post
Share on other sites
VFAI already done this, but variety is great... looking forward how yours come out

Nope, unless I missed something, VFAI only uses dead bodies for rearming, not weapon crates or piles of stuff on the ground.

Share this post


Link to post
Share on other sites
Nope, unless I missed something, VFAI only uses dead bodies for rearming, not weapon crates or piles of stuff on the ground.

Thats exactly what i thought too.

This is great, just for a fun I posted in the betas (now suppression is starting to work better again) that all we need now is AI to auto rearm or conserve ammo ... and low and behold ... heres the solution. :)

Share this post


Link to post
Share on other sites

Ive never used VFAI but i like the sound of it, this sounds good too, would be a nice feature. it all adds to the immersion and realism is what we all want, thanks.

Share this post


Link to post
Share on other sites

So, anyone knows how to make AI move to waypoint quietly ? I just want them to move without giving confirmation when in place. The voice removal addons are a solution but less than ideal.

Share this post


Link to post
Share on other sites

Thx, Great Addon!

With VFAI we almost had an ammo bug in our CTI missions (if u rearm, many magazines placed on the ground).

Do you tested MP compatibility?

Share this post


Link to post
Share on other sites

Really needed in stock A2. AI recognize field hospitals and heal themselves, but doesnt recognize ammo boxes for rearming.

Good addon.

Share this post


Link to post
Share on other sites

At the moment it's just an ugly hack :) But when/if it's ready it will work in MP yes.

Share this post


Link to post
Share on other sites

do you think it would work for civilians? So i could get civilians to pick up guns of dead insurgents and shoot at us?

Share this post


Link to post
Share on other sites
do you think it would work for civilians? So i could get civilians to pick up guns of dead insurgents and shoot at us?

Sure, if the civilians are enemy to you.

VFAI_Equipment already handles that, with options for turning this on/off.

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  

×