Home   Help Search Login Register  

Author Topic: Clear!  (Read 1068 times)

0 Members and 1 Guest are viewing this topic.

Offline UH60MG

  • Members
  • *
Clear!
« on: 09 Mar 2008, 11:42:00 »
Is there a way to make an AI group that is in "COMBAT" mode think the area is free of enemies and then go back into "SAFE" mode?

« Last Edit: 09 Mar 2008, 11:44:18 by UH60MG »

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Clear!
« Reply #1 on: 09 Mar 2008, 12:09:11 »
You might try to setup its combat mode to BLUE and its behaviour to CARELESS.

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Clear!
« Reply #2 on: 09 Mar 2008, 12:24:22 »
Random idea that popped into my head

Use the findNearestEnemy command to find the nearest enemy of the group leader (who should be aware of all the enemies of the group), then set that enemy to setCaptive true (which is the equivalent of changing their side to something not-enemy, I think). After that, run the findNearest enemy command again, set that enemy to captive etc. etc until findnearestenemy return null = no contacts.

Of course, that means there're bunches of enemies out there that are setcaptivated, but you could save them in an array and un-captivate them when necessary. Depending on what kind of situation it is you need this for? Also, using reveal + setcaptive true might be necessary, since it usually takes a while otherwise for AI commanders to grok that something's changed. This should lead to the AI commander saying "clear!" after a while. Note they won't return to safe mode automatically, so you might need to tell them that separately.

Might work, might not?

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"