Home   Help Search Login Register  

Author Topic: AI in open areas...  (Read 1631 times)

0 Members and 1 Guest are viewing this topic.

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
AI in open areas...
« on: 02 Feb 2009, 17:09:20 »
I've had a search around the forum, but can't seem to find the answer to my question (at least, not specifically enough).

Basically, I've got a mission where the player (and his squad) is defending a prison/outpost against enemy AI.  The problem here is that the outpost is in a large, open area, and the defending force would seem to have a significant advantage.  What I want the ~50 AI to do is basically 'swarm' the outpost, in an attempt to over-run it - but here's the problem: they just pussyfoot around, taking the odd shot, and diving for prone as soon as they hear a single shot... they make no real effort to get anywhere near the outpost, and most of them get shot by the sniper before they get within 500m.

Of course, I've tried setting them 'careless', but then that just makes them oblivious to the bullets flying past their head for a little while, then they revert to their previous timid, wimpy behaviour.

What I would ideally like is for the AI to head straight for the outpost, like a bunch of crazed madmen, and actually attempt to: a) defend themselves; b) get to the outpost - not just one or the other.

Anyone have any experience and/or ideas about how to do this?  Obviously, the intelligent reaction under suppressive fire is sorted (thanks to ROMM IA) - but I just want the AI to be a bit more aggressive when they're out in the open.

Thanks in advance  :)

Offline Deadfast

  • Members
  • *
Re: AI in open areas...
« Reply #1 on: 02 Feb 2009, 19:13:33 »
Well, I believe setUnitPos could help you out a bit (make sure they don't go prone).

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: AI in open areas...
« Reply #2 on: 02 Feb 2009, 19:35:57 »
Whilst that does stop them being quite so wimpy, it still doesn't give them any form of aggression... they just stand around defensively, rather than lie around defensively.

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: AI in open areas...
« Reply #3 on: 04 Feb 2009, 03:26:56 »
I feel your pain.  Bending ARMA AI to your will is very frustrating.

Here's a couple things you can try:

1. Guard Waypoint used with "Guarded By" Triggers.   You put the "guarded by" trigger in the outpost, and give the attackers "Guard" waypoints.  Read about it here:

http://community.bistudio.com/wiki/Waypoint:Guard

They will attack, but still take their sweet time once they are fired upon.

2. Move attackers to outpost using DOMOVE command.  Give each attacking group a TALK waypoint, and put this line of code in the waypoint:

Code: [Select]
{_x domove (getpos west3); _x setUnitPos "UP"; _x allowFleeing 0} foreach units group this;
In the above code west3 is a unit in the outpost.  Use whatever objects or markers you want for positions to move to.  AI seems to take a domove command as a priority over tactical AI behavior.

You won't get a swarm effect--they still pause to shoot alot--but at least they move more aggressively than standard AI.  You also lose any standard AI flanking tactics.  So you might want a mix of techniques using many assaulting groups (some standard waypoints, some guarded by waypoints, some Talk waypoints with domove).  The mix can keep it unpredictable.

Attached is a sample demo mission.

Good luck dude.


El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: AI in open areas...
« Reply #4 on: 10 Feb 2009, 19:08:04 »
Thanks for that, Johnny... I'll give it a go and see what happens!  At the moment, I've just got them running banzai towards the outpost... it's better than them wimping out at 800m away, but, still not what I was going for! :)

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: AI in open areas...
« Reply #5 on: 10 Feb 2009, 19:14:06 »
You're welcome.  Hope it helps out.

How did you get them to run banzai for the compound? 
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: AI in open areas...
« Reply #6 on: 10 Feb 2009, 23:30:09 »
Continually remove any information about the enemy, continually set them to careless, continually force them to stay standing, etc, etc.  Anything that'll cause them to think there's absolutely nothing wrong at all.  A bit useless, though, if you want them to actually shoot at something!

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: AI in open areas...
« Reply #7 on: 11 Feb 2009, 20:42:51 »
Quote
Continually remove any information about the enemy
:dunno:
urp!

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: AI in open areas...
« Reply #8 on: 12 Feb 2009, 01:12:11 »
Sorry, badly phrased... that should have read more like:
"Continually ensure they do their best to 'ignore' the enemy: ..."