Home   Help Search Login Register  

Author Topic: How do you make A.I. pilots target planes  (Read 655 times)

0 Members and 1 Guest are viewing this topic.

Commando

  • Guest
How do you make A.I. pilots target planes
« on: 13 Nov 2002, 18:56:31 »
If I have the F-16 from G8 mod(or any other addon plane with AA-missiles) how do I make it target a enemy plane with the missiles and shot it down? Im having big problems with making things work.. they use the machineguns or something else.. :-\

Kaliyuga

  • Guest
Re:How do you make A.I. pilots target planes
« Reply #1 on: 14 Nov 2002, 08:20:44 »
   I'm guessing that being superspecific might be the way to go to get it to work

use dotarget , dofire, fire commands....


the fire command allows you to specify a weapon that will be fired.. alternatively you could try removing all the MG ammo if they want to keep firing that off  

Commando

  • Guest
Re:How do you make A.I. pilots target planes
« Reply #2 on: 14 Nov 2002, 10:39:17 »
Thanks Kaliygua! :) i'll try that when I get home.
One thing only to besure, you write the commands in the init fields or triggers?

Kaliyuga

  • Guest
Re:How do you make A.I. pilots target planes
« Reply #3 on: 15 Nov 2002, 00:42:49 »
 You can use the commands either place.. the difference being when they are called in the game...

anything in the init line of a unit will occur as soon as the mission begins.... and anything in a trigger will occur when that trigger goes off.....

so.. more than likely you'll want to use a trigger, because the pilot will obviously need to be in range of their enemy


I had another thought as well.....   taking a look at the threat model in the plane's config.cpp might give you a clue..
i'm not sure.. but possibly the planes give ground targets higher priority in OFP ???


Commando

  • Guest
Re:How do you make A.I. pilots target planes
« Reply #4 on: 15 Nov 2002, 13:49:57 »
Kaliyua it worked exellent for me! I onlu needed to type in the code like this unitname fire Sidewinder. :D
Just one thing missing now is the audio warning trigger/script that im trying to figure out..

do you thnik I could write it like this unitname target player1 hint "Enemy got us looked!"

And have a ogg file in the mission that plays a sound?
I don't have any scripting experience, and would need some help on this. :-\