Home   Help Search Login Register  

Author Topic: squad AI [QUESTION]  (Read 1217 times)

0 Members and 1 Guest are viewing this topic.

Offline twisted

  • Members
  • *
  • I'm a llama!
squad AI [QUESTION]
« on: 22 Jan 2009, 17:57:41 »
One of Arma's soldier AI's big weak points is that each soldier works on his own even when part of a squad.

I am trying to write a script that remedies that, and implements sort of intelligent squad based reaction to coming under fire while keeping things very simple.

each script would be assigned to AI squad leader. in its simplest form the script stays inactive until enemy is detected or AI comes under fire.

The first part i am trying to write would be what to do when coming under fire as AI is worst at this. Currently the simple response i want is...

squad breaks into two parts (A and B).
All hit the ground and look for nearest cover.
Group A fires at the 'know' location of enemy.
Group B starts to run for cover (ranked by protection offered and closeness), stopping every 10m to fire at enemy then run again.
When group B gets to cover they move back a bit so as to be able to see enemy and begin providing suppressing fire.
Group A now begins fire and move routine to cover. the two groups rejoin and Arma AI takes over.


Now i am reading through old scripts and using the comref to get things started, but i am finding it very difficult to build a frame work. this is because i have very little scripting experience.

if someone could advise me through this project I would appreciate it.

eventually i would like to get squad AI reacting to a bunch of different situations where the AI should work together. but getting this framework built is my first step.



Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: squad AI [QUESTION]
« Reply #1 on: 22 Jan 2009, 19:14:13 »
I suggest looking at ROMM_IA script by Rommel:

http://www.ofpec.com/ed_depot/index.php?action=details&id=555&game=ArmA

It reacts to enemy contacts, has some units apply suppressing fire, while other units flank.  It's a good place to start because his code is modular and concise.   The only drawback is he uses very short variable names, which reduces readability  IMO.  But since the code is modular, its manageable to understand each piece.  It's clean.

Should give you some good ideas, and save re-inventing suppression.
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 twisted

  • Members
  • *
  • I'm a llama!
Re: squad AI [QUESTION]
« Reply #2 on: 23 Jan 2009, 02:53:37 »
thanks. i am looking at rommels script now. smart guy. must admit am finding it difficult to understand as a beginner but will keep trying.
 :)

in fact, i think rommels suppression script has been incorporated into ACE - which i use as my default for Arma. It is more the squad reaction to being fired on that i wish to simulate as i am tired of the AI just lying there dying one by one.