Home   Help Search Login Register  

Author Topic: Smart AI How To?  (Read 437 times)

0 Members and 1 Guest are viewing this topic.

LiverWurst

  • Guest
Smart AI How To?
« on: 29 Jun 2004, 18:25:49 »
 Was wondering if anyone could help with a script that would make the AI smarter in noticing their flag being captured?

(I am already using parts of Backoff's Capture & Hold script and its working great.)

Here is the senario:

The game is MP with only one side (US) being human playable.  The parts of the C&H script that I have incorporated work great...I run up to the RUS flag pole, take the flag, and it puts the US flag on the pole, also on the map it changes the color of the ellipse from red to blue.  I have removed the scoring, the need to hold flag for a certain amount of time or the need to bring the RUS flag back to base.  All I require is for the enemy flag to be taken down and allied to be put on the pole in order for the territory to change sides and this is where my problem arises.  If I capture the AI flag and there are still RUS patrols, they do not try and take their flag back.  They just stand around the flag pole like nothing is wrong.  So, like I asked before, is there any way that anyone could help in the creation of a script that would make the AI take notice of the fact that they have lost their territory/flag and simply walk up to the flag pole and use the 'Take Flag' command in order regain control of their territory/flag?


Thanks....

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Smart AI How To?
« Reply #1 on: 01 Jul 2004, 12:24:00 »
I don't know anything about MP or CTF.    It may be that the game has AI routines to make the AI go to the flagpole and change the flag.

But if it doesn't, then you will have to order the AI to do it.   Changing the flag is easy - you just need a wee trigger around the flagpole, East present, and doing all the things that need to be done when East gets there.   Basically the same but opposite to what happens when West gets there.

Making them go there could also be easy:  you just dish out doMove or setWPPos commands.    However, the tricky bit is making them do that in a smart way.    You could create a script that, for example, makes the nearest / largest / smallest / both nearest and furthest away / random /group move to flagpole and then stay there to guard it.  
Plenty of reviewed ArmA missions for you to play