OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: UH60MG on 06 Feb 2008, 02:52:12

Title: Is it possible to make AI fire flares into the sky in ArmA?
Post by: UH60MG on 06 Feb 2008, 02:52:12
I know it was easy to do OFP...

Assuming the AI soldier has grenade launcher with some flares how would you go about doing it?

E.G:

soldierOne fire ["M4A1GL","FlareWhite_M203"]

Doesn't work for me.
Title: Re: Is it possible to make AI fire flares into the sky in ArmA?
Post by: UH60MG on 06 Feb 2008, 03:47:48
I found the solution:  :good:

soldier fire ["M203Muzzle","M203Muzzle", "FlareWhite_M203"]
Title: Re: Is it possible to make AI fire flares into the sky in ArmA?
Post by: Tajin on 06 Feb 2008, 13:50:18
aye and you can aswell spawn flares directly if you like.

Code: [Select]
"F_40mm_White" createVehicle [(position player) select 0,(position player) select 1,300];
Title: Re: Is it possible to make AI fire flares into the sky in ArmA?
Post by: h- on 06 Feb 2008, 20:29:57
UH60MG, please do not post consecutively.
A couple of days should pass first, if you have something to add after a short period of time modify your post instead of replying to yourself. :)
Title: Re: Is it possible to make AI fire flares into the sky in ArmA?
Post by: UH60MG on 07 Feb 2008, 16:01:52
Ok.  :yes:
Title: Re: Is it possible to make AI fire flares into the sky in ArmA?
Post by: CAS_Daniel on 28 Feb 2008, 17:58:34
Tajin (or anyone :P), what line would I use to make a flare pop up when a trigger is activated? And would this be MP safe? (ie, not spawn billions of flares for every extra person on the server)

Cheers!
Title: Re: Is it possible to make AI fire flares into the sky in ArmA?
Post by: Tajin on 28 Feb 2008, 23:14:10
change the trigger condition to
Code: [Select]
this && isServer
and use something like this
Code: [Select]
"F_40mm_White" createVehicle [(position player) select 0,(position player) select 1,300];you'd probably want to use a different position though

Title: Re: Is it possible to make AI fire flares into the sky in ArmA?
Post by: CAS_Daniel on 28 Feb 2008, 23:28:57
Yeah, guess what I meant was, what do I change to add this to a trigger activation field? I like to graft most of my missions within the editor.  :P
At the moment I still get a "Type Object, Expected Nothing" error.

"this && isServer" looks nifty, can that be used in a lot of situations where things get multiplied online?

Thanks again.
Title: Re: Is it possible to make AI fire flares into the sky in ArmA?
Post by: Denz on 29 Feb 2008, 03:15:39
to make a flare trigger I usually do it like this:
Code: [Select]
flare1 = "F_40mm_Red" createVehicle [getPos flaretrig1 select 0, getPos flaretrig1 select 1, 50]I've named the trigger "flaretrig1" and the very last number (50 in this case) is the height you want the flare to appear at.
Title: Re: Is it possible to make AI fire flares into the sky in ArmA?
Post by: CAS_Daniel on 29 Feb 2008, 14:28:38
Awesome, thanks for the noob-proof explanation!  :good:
Title: Re: Is it possible to make AI fire flares into the sky in ArmA?
Post by: Callaghan on 25 Mar 2008, 10:57:58
also, the ECS mod gets the AI to fire flares automatically without the need for editing.
Bear in mind flares don't do anything for the AI.
Maybe someone should write a script that increases the skill of troops within a certain radius of friendly flares...