Home   Help Search Login Register  

Author Topic: how to make AI fire covering fire and flares?  (Read 2457 times)

0 Members and 1 Guest are viewing this topic.

Offline urias03

  • Members
  • *
how to make AI fire covering fire and flares?
« on: 22 Aug 2009, 11:57:01 »
ok got some questions..i hope that i'll get answers for all of them:

1.this question spilt to 2,first i want 2 soldiers to split from the squad,i don't know how to do that
then i want them to fire covering fire..so i just need them to fire at direction untill they run out of ammo

2.i'm using RKSL pumas and lynxs and they can fire flares,how can i make the AI do that?
actually i want to know how to make AI to fire flares(not just the choppers)

that's all i think..

Offline haroon1992

  • Members
  • *
  • My life is hopeless...
Re: how to make AI fire covering fire and flares?
« Reply #1 on: 22 Aug 2009, 14:30:42 »
For the first question, let me know that :
do you want only the specific two personals to split or do you want something like a template which you can use several times?
Very busy with life, business, and other stuff. Away from OFP for months. Not sure if I could get back onto it. :(

Offline urias03

  • Members
  • *
Re: how to make AI fire covering fire and flares?
« Reply #2 on: 22 Aug 2009, 18:01:40 »
I'll give you the scenario:
assault on a town,I got let's say 10 man squad,now I want to tell 2 of them to split from the rest of the squad ,lay down and just fire at a direction I tell them untill they run out of ammo

Offline haroon1992

  • Members
  • *
  • My life is hopeless...
Re: how to make AI fire covering fire and flares?
« Reply #3 on: 23 Aug 2009, 15:36:07 »
Alright, let me know what if it(the mission) requires some HEAVY SIZED Addons.

If so, i am sorry to say that i can't handle that much heavy ones (connection's too slow here)

If not , just remind me and send it to http://www.roon.ha@gmail.com

Haroon1992.............
Very busy with life, business, and other stuff. Away from OFP for months. Not sure if I could get back onto it. :(

Offline urias03

  • Members
  • *
Re: how to make AI fire covering fire and flares?
« Reply #4 on: 23 Aug 2009, 20:18:08 »
if you know how to do it you don't need the mission..just do new one with what i asked and upload it if you can...

btw,if you'll do it..maybe you can do the flares thing too if you know?

Offline haroon1992

  • Members
  • *
  • My life is hopeless...
Re: how to make AI fire covering fire and flares?
« Reply #5 on: 24 Aug 2009, 14:47:04 »
Okay, i 'll try to make the missionet but i am in a busy status now...updating my missions....
Maybe you will get the missionet the coming Thursday....
Okay?
Very busy with life, business, and other stuff. Away from OFP for months. Not sure if I could get back onto it. :(

Offline urias03

  • Members
  • *
Re: how to make AI fire covering fire and flares?
« Reply #6 on: 24 Aug 2009, 15:33:09 »
sure
as long as you'll do it i don't mind waiting

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: how to make AI fire covering fire and flares?
« Reply #7 on: 25 Aug 2009, 12:45:57 »
Urias03...
To force two squad members to fallout and move to a specified position you will have to first give them both a name in their name field to refer to. In a trigger, script or waypoint you then call out the two and have them join a null group for example....

{_x joingrpnull} foreach [mgman,mgassist] <---mgman and mgassist are the units names

You then have them move to specified positions. To specify the position you can use camera.sqs to find the array coordinate OR place a named gamelogic or object where you want them to go for example...

mgman move [0,0,0] <----Thats if you know the array coordinates
mgassist domove getpos gamelogic1 <--thats the name of the gamelogic you've placed

Once there, you can have them target and fire with the dofire and dotarget commands for example...

mgman dotarget badman1; mgassist dotarget badman2
mgman dofire badman1; mgassist dofire badman2

Or you can have them face a certain direction, go prone and change their combat mode so that they engage all for example

mgman dowatch 180; mgman setunitpos "down"; mgman setcombatmode "red"

Check out the comref for more commands

Also, AI can be very unpredictable. I have used invisible targets in the past to ensure that they recognize and fire on the targets. With the targets, they fire reload and fire again until they are out of ammo. You can then keep adding ammo to them just to provide ambiance. When you need them to stop firing...setposition the target out of view. By using the targets, you will only have to change the behaviour to ensure they hit the dirt..If thats what you desire. and make sure they are facing it to see it.

Hope I didn't just confuse you.

Offline urias03

  • Members
  • *
Re: how to make AI fire covering fire and flares?
« Reply #8 on: 25 Aug 2009, 13:43:54 »
little bit..
you mean i need to write in the waypoint  all those commandes?
like {_x joingrpnull} foreach [mgman,mgassist] and mgassist domove getpos gamelogic1?

Offline haroon1992

  • Members
  • *
  • My life is hopeless...
Re: how to make AI fire covering fire and flares?
« Reply #9 on: 25 Aug 2009, 15:48:49 »
No, you should use a trigger instead of waypoints, in that trigger , make the condition as you desired...
In On Act you have to type them....
But using a SCRIPT is recommended [by me :D] as they are a lot easier to handle.....
Eg...
makethemdoit.sqs
{_x joingrpnull} foreach [mgman,mgassist]
~2
;this make the script wait for 2 seconds
mgassist domove getpos gamelogic1
~1
@ unitready mgassist
;check if mgassist is in position,once units are stopped, they are considered ready...
;@ is the wait command, the script waits until the condition followed is executed/met
mgassist dotarget target1
~2
mgassist setunitpos "down"
mgassist setcombatmode "red"
~1
mgassist dofire target1

@! someammo mgassist
mgassist dotarget objnull
;someammo command is used to check if mgassist has a few ammos left....
;objnull is a place holder or something that can stop mgassist targeting target1
Very busy with life, business, and other stuff. Away from OFP for months. Not sure if I could get back onto it. :(