Hi there! I want a fighter aircraft pass above a specific position and fire its canon there !! Thank you.
Hi there! I want a fighter aircraft pass above a specific position and fire its canon there !! Thank you.
I don't really know if there's another possibility than use the unitCapture and unitPlay commands... ?!
Any ideas ?!
I tried that:
but it doesn't work.... :/PHP Code:_avion = _this select 0;
_cible = _this select 1;
_pilot = driver _avion;
_avion doMove (position _cible);
_pilot doMove (position _cible);
sleep 1;
waitUntil {(_avion distance _cible) < 300};
sleep 1;
_avion selectWeapon "GAU8";
_avion doTarget _cible;
_avion doWatch _cible;
_pilot doTarget _cible;
_pilot doWatch _cible;
sleep 1;
_avion doFire _cible;
_pilot doFire _cible;
_avion fire "GAU8";
_pilot fire "GAU8";
this is what I use but the plane has to be within sight of target, so use a trigger to run it as a script#check
man selectweapon"GAU8"
man lookAt target
man dotarget target
goto"check"
man dofire target
man fire"GAU8"
or else it will fire its rounds even when its out of its sight
Samsung SyncMaster 2220WM 22-inch LCD Monitor
Intel Core i7-930 Bloomfield 2.8GHz
CORSAIR XMS3 4GB (3 x 4GB) 240-Pin DDR3 SDRAM
Western Digital Caviar Green WD7500AADS 750GB
GeForce GTX 580 (Fermi)
Windows 7 Ultimate 64 bit
Well I tried that:
But it still doesn't work :/PHP Code:_avion = _this select 0;
_cible = _this select 1;
_pilot = driver _avion;
_groupe = group _pilot;
_wp = _groupe addWaypoint [position _cible, 0];
_wp setWaypointType "DESTROY";
_pilot reveal [_cible, 4];
sleep 2;
waitUntil { (_pilot distance _cible) < 400};
_pilot selectweapon "GAU8";
_pilot lookAt _cible;
_pilot doTarget _cible;
_pilot dofire _cible;
_pilot fire "GAU8";
To fire the weapon is quite easy.
The problem is if the gun isn't on a turret the pilot will never line the plane up to use the gun accurately, it will just fire a burst.PHP Code:null = plane fireattarget [target,"GAU8"];
Also I don't think the DESTROY watpoint will do what you want. I think it works more like Waituntil Destroyed
I've cobbled up a way to do it.
The plane will fly in and take out the fuel tank to the left of the street light.
http://www.sendspace.com/file/hvh88g
Last edited by F2k Sel; Jul 18 2012 at 00:43.
Pelham created a script with fake firing - basically the plane flew over and then the cannons would fire (well the sound would play) but it was just create the damage on the target using "B_30mmA10_AP" - utilising shk_pos.
works well![]()
[FOCK] Mikie J
Looking for New Players at Fockersteam
http://fockers.moonfruit.com/
A2/OA
COOP Most Wanted - [Fockers] Most Wanted Co-x v07-09-2012
Fock IED - http://www.armaholic.com/page.php?id...highlight=FOCK
Fock Recruit/Group Management - http://www.armaholic.com/page.php?id=20580
A3
TvTCache Hunt - [FOCK]ers Cache Hunt TvT-x [ALPHA]
Scripting Tutotial -http://www.armaholic.com/page.php?id=20465#comments
Fock Recruit/Group Management - http://www.armaholic.com/page.php?id=19041