OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Blanco on 28 Jan 2006, 13:25:18
-
Hello,
I want a Polikarkov I16 (FDF 1.4) to fire his cannons via the fire command
I thought a...
plane fire "FDF_airShVAK2x20"
...in a fast loop would do the trick, but it doesn't.
I want to make a straferun script, I put a big trigger over the trenches that activates the firingscript when the plane enters the triggerarea.
Works great with bombs (different plane), but I can't make it work with the cannons.
-
What happens? Does it fire one shot or does it simply refuse to open fire?
The "one shot" problem:
Fire commands work great for single shot weapons (like bombs, missiles). For automatic weapons however you need to specify the muzzle and firemode (see the comments under Fire in the comref)
The "refuse to fire" problem:
Most likely it's a typo in the FDF-mod manual, regarding weapon names. The fire command usually works for me in similar situations (I have only tried it with BIS vehicles, though)
-
It refuses to fire...
The plane is a Polykarpov I-16 (Cannons)
Checked via a fired EH (names are the same in the FDF readme):
Weapon = "FDF_airShVAK2x20"
Muzzle = "FDF_airShVAK2x20"
Mode = "FDF_airShVAK2x20"
Ammo = "FDF_airShVAKammo"
I tried :
plane fire ["FDF_airShVAK2x20"]
Nothing
plane fire ["FDF_airShVAK2x20","FDF_airShVAK2x20"]
Nothing happened
plane fire ["FDF_airShVAK2x20","FDF_airShVAK2x20","FDF_airShVAK2x20"]
Nope
plane fire ["FDF_airShVAK2x20","FDF_airShVAK2x20","FDF_airShVAKammo"]
An errormessage : no entry 'config.ccp/CfgWeapons.FDF__airShVAKammo'
:-\
-
The error message says: "There is no fire mode named FDF_airShVaKammo"
But aparently there is a cfg entry for FDF_airShVaK2x20, because that doesn't produce an error, right?
Have you tried to replace the third parameter with AUTO (the same as for original BIS vehicles)?!?