Home   Help Search Login Register  

Author Topic: How do I make AI Defend  (Read 654 times)

0 Members and 1 Guest are viewing this topic.

Chaos_Creator

  • Guest
How do I make AI Defend
« on: 28 Feb 2003, 04:44:32 »
Ever notice that you place a group of AI soldiers in a defend/ambush spot, and when they see an enemy unit - the leader orders them to attack it? That's normal, but the AI units always move toward the enemy units leaving themselves exposed.

I need to figure out how to make my boys stay put and shot from their positions - without getting up and moving towards the bad guys. I've tried using - INIT:this disableAI "MOVE" and this setunitpos "DOWN", and they stay down and put, but it turns AI move off for the entire mission. Also, if enough guys get waxed in the group - they automatically stand up.

I'm trying to setup a mountain ambush scene, but my guys always get killed too easily when they leave their positions and rush the enemy.

Any ideas on how I can get a realistic defend mode?

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:How do I make AI Defend
« Reply #1 on: 28 Feb 2003, 09:18:40 »
try replacing unit disableai "move" with

unit dostop true

and when you want them to move again use

unit dostop false


also you might want to use  

groupname allowfleeing 0
Not all is lost.

Chaos_Creator

  • Guest
Re:How do I make AI Defend
« Reply #2 on: 02 Mar 2003, 07:07:54 »
I thought once you stopped a unit - it was permanent? Cool...I'll have to try that. I guess it's going to be hard to overturn the fundamental AI programming - they see it...they chase it...they kill it..

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:How do I make AI Defend
« Reply #3 on: 02 Mar 2003, 07:47:36 »
@ artak - wats dostop true ? ::)

derer

dostop unitname (unitname dofollow (leder unitname)) wil make it move back

and dere is

nitname stop true (but da unit wont fire like dat)

and unitname stop false will allow it 2 move again

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta