Home   Help Search Login Register  

Author Topic: Enemy AI using artillery  (Read 4507 times)

0 Members and 1 Guest are viewing this topic.

Offline CaptainBravo

  • Members
  • *
Enemy AI using artillery
« on: 21 Aug 2009, 13:08:43 »
hey everyone,

I have searched for Enemy AI using artillery script and could not find any (except a few for OFP and arma)

I was wondering if there are any for Arma2? I am looking for one where AI can automatically detect my troops and fire on them.

Thanks in advance for your help.

Offline mikey

  • Former Staff
  • ****
  • Whitespace Whore
Re: Enemy AI using artillery
« Reply #1 on: 21 Aug 2009, 15:57:06 »
I'm actually planning on making such a script for a mission this weekend.

Basically I'll keep looping a findNearestEnemy every 10 seconds, and when the enemy FO discovers an enemy, it will create a fire mission template based on the enemy position. Depending on daylight the script should chose for ILLUM or HE.

I have no idea if this is gonna work well, since scripts relying on BIS AI usually end up kinda dodgy, but I'll let you know if I have some success.

Offline CaptainBravo

  • Members
  • *
Re: Enemy AI using artillery
« Reply #2 on: 21 Aug 2009, 16:15:36 »
Thanks Mikey for your response.

I know Grouplink scrip (old ofp) had enemy AI ID and fire artillery.. not sure if that would help.

Good luck with the script, A2 needs such a script!

Offline granQ

  • Contributing Member
  • **
    • Anrop.se
Re: Enemy AI using artillery
« Reply #3 on: 21 Aug 2009, 21:52:50 »
Depending on daylight the script should chose for ILLUM or HE.

awesome idea.. consider it stolen :p
Cura Posterior

Offline mikey

  • Former Staff
  • ****
  • Whitespace Whore
Re: Enemy AI using artillery
« Reply #4 on: 22 Aug 2009, 12:48:37 »
small update

I hacked something together last night which seemed to work, but unfortunately the AI FO kept having a knowsAbout level about his target and also findNearestEnemy kept returning the target, even when I moved the target  into cover 2 km away in dead ground after being spotted. So it seems that in arma 2 the knowsAbout level doesn't decrease if the AI doesn't have his target in LOS anymore.

But, I just found the command nearTargets, and it seems to do what I want. If the enemy is out of LOS, the "assumed accuracy of the perceived position"  seems to increase a lot (lower is better), which is perfect for detecting if the targets moved away in cover.

Offline Inkompetent

  • Members
  • *
Re: Enemy AI using artillery
« Reply #5 on: 22 Aug 2009, 13:00:05 »
knowsAbout does decrease, but not instantly. It detoriates over time, so you'll have to manually set the knowsAbout value by script if you want the AI to become unaware of something.

Offline mikey

  • Former Staff
  • ****
  • Whitespace Whore
Re: Enemy AI using artillery
« Reply #6 on: 22 Aug 2009, 15:18:18 »
Well, I did wait 5 minutes after I put the target 2km away behind a forest, and the value was still the same, and findNearestTarget was still set on that dude while my own squad was much closer.

And how do I set the knowsAbout level, because I haven't seen how to do that yet.

Offline Inkompetent

  • Members
  • *
Re: Enemy AI using artillery
« Reply #7 on: 22 Aug 2009, 16:50:21 »
Good question. I'm fairly sure I've seen it done somehow with a controlled reduction of the value but I can't recall what was done. Or I'm just generally confused. Might very well have been changing sides for units to change target priorities when I think about it...

Offline CaptainBravo

  • Members
  • *
Re: Enemy AI using artillery
« Reply #8 on: 25 Aug 2009, 17:53:47 »
Hey Mikey,

Any luck so far with the AI artillery?  :scratch:

Offline mikey

  • Former Staff
  • ****
  • Whitespace Whore
Re: Enemy AI using artillery
« Reply #9 on: 25 Aug 2009, 20:10:04 »
Not really. I was asked later in the weekend to make this (a spon crewNotify and status clone), but that's done now. So I'm planning to start working on the enemy FO script again soon.
« Last Edit: 25 Aug 2009, 20:29:16 by mikey »

Offline CaptainBravo

  • Members
  • *
Re: Enemy AI using artillery
« Reply #10 on: 25 Aug 2009, 22:05:01 »
is that spon part of the Hypred HC? It looks pretty good. I'd like to test it if that is ok.

I am also looking forward to your artillery script.


Offline CaptainBravo

  • Members
  • *
Re: Enemy AI using artillery
« Reply #11 on: 01 Sep 2009, 10:15:28 »
Any updates on AI artillery ?

Offline mikey

  • Former Staff
  • ****
  • Whitespace Whore
Re: Enemy AI using artillery
« Reply #12 on: 05 Sep 2009, 01:27:47 »
not really. the spotting and aiding the ai in spotting enemies worked ok, but I still need to make something for decision making. I guess im gonna try out the fsm editor for that, to see if it can make that easier for me.