I'm using Nicolas cluster bomb script that he triggers from the option scroll from the C-130. It works fine that way and perfect.
I try do do the same when the plane enters a trigger area or waypoint. It does run the script, because it does announce the "Bombs Away" text. But they don't drop.
// Author: Nicolas
// version: 1.0
//variables
_bomb = "RHIB";
_bomb2 = "RHIB";
_plane = _this select 0;
_i= 0;
player globalChat format["%1","Bombs away!"];
//spawning bombs
for [{_i=1}, {_i<6}, {_i=_i+1}] do //change 6 for whatever number of bombs you want the c-130 to be able to drop (here its 6x2 = 12 bombs)
{
_bomb = "Bo_GBU12_LGB" createVehicle [1000, 1000, 1000];
_bomb attachTo [_plane, [4, 0, -5]]; //spawn under left wing
sleep 0.01; //allow the bomb to be attached before detaching it
detach _bomb;
sleep 0.15;
_bomb2 = "Bo_GBU12_LGB" createVehicle [1000, 1000, 1000];
_bomb2 attachTo [_plane, [-4, 0, -5]]; //spawn under right wing
sleep 0.01; //allow the bomb to be attached before detaching it
detach _bomb2;
sleep 0.15;
};
//destroying variables
_bomb = nil;
_bomb2 = nil;
_plane = nil;
_i = nil;
-------------- Calling it with -------------- from waypoint
_nil = [] execVm "carpet.sqf";
-----------------
I'm just learning a lot of this, but my other stuff runs well. Cept this from a waypoint.
HOME
Reply With Quote
