OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Messiah on 21 Jul 2004, 10:33:42

Title: Mavericks
Post by: Messiah on 21 Jul 2004, 10:33:42
ok... i read the command reference, and this is what i came up with for force firing a maverick missile:

plane fire ["MaverickLauncher", "Maverick", "Maverick"]

when that is used tho, it errors saying that there is no entry for cfgweapons maverick.... so im totally confused now - does anyone know the correct synthax?
Title: Re:Mavericks
Post by: h- on 21 Jul 2004, 11:52:20
I don't think you can use the fire function on vehicles, only men... :(

At least I have never seen that you could choose a firemode in a vehicle...
which would be 'single', 'burst' or 'auto'...

You got the error probably because there's no firemode called Maverick...

I think you better use the the combination of doTarget and doFire...
And to get the plane to use Mavericks just remove all the other ammo and give it back afterwards...

Dunno if it works though...
Title: Re:Mavericks
Post by: Messiah on 21 Jul 2004, 12:56:30
no... i can make apache's fire their hellfires... so it is possible, just seems the command reference has the names wrong?
Title: Re:Mavericks
Post by: Platoon Patton on 21 Jul 2004, 13:41:55
Mavericklauncher,Maverick is correct.

But the cannon name isnt,its Machinegun30A10Burst.

this addeventhandler ["fired" ,{hint format["weapon:%1\nammo:%2",(_this select 1),(_this select 4)]}] is the way to find it.

Somebody with alot of spare time should check all vehicles  ;D
Title: Re:Mavericks
Post by: Messiah on 21 Jul 2004, 13:45:35
no... worked it out in the end  Hater_kint was kinda on the money... basically you only pass arrays with 'fire' for units. for vehicles it just needs the launcher name in a string:

plane fire "MaverickLauncher"

the command reference needs updating to reflect this i think  :)