OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started 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.
-
I found the solution: :good:
soldier fire ["M203Muzzle","M203Muzzle", "FlareWhite_M203"]
-
aye and you can aswell spawn flares directly if you like.
"F_40mm_White" createVehicle [(position player) select 0,(position player) select 1,300];
-
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. :)
-
Ok. :yes:
-
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!
-
change the trigger condition to
this && isServer
and use something like this
"F_40mm_White" createVehicle [(position player) select 0,(position player) select 1,300];you'd probably want to use a different position though
-
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.
-
to make a flare trigger I usually do it like this:
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.
-
Awesome, thanks for the noob-proof explanation! :good:
-
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...