Home   Help Search Login Register  

Author Topic: C-130 carpet Bomb  (Read 1429 times)

0 Members and 1 Guest are viewing this topic.

Offline G-Man

  • Members
  • *
C-130 carpet Bomb
« on: 31 Jul 2009, 05:10:16 »
Hi all,

I very new to mission editing and scripting I have only just started taking interest since I started my own squad.

I have modified Xeno's Co30 Domination west. most of the scripts that I've used in there are working well.One of the scripts I am using is the C-130J Carpet Bomber by Nicolas.
 
There are a few things I would like to fix on the mission.

1.The fact that the pilot of the C-130j does not have his kills registered or have points deducted for TK's.

2.The action to drop the bombs is in the action menu, I would like to create a key bind instead.

3. The bombs are endless you can keep bombing to your shot down.I would like to limit the amount of bombs so you would have to rearm after a couple of runs.

I am using it with a trigger On Act: C_130 addaction ["Bombs away!", "carpet.sqf",[],1,false,true,"","_this == driver _target"];

I am not using it in the initialization of the  C-130 as I am using the
Simple Vehicle Respawn by Tophe with the Put car in C-130 by norrin which looks like this: res= [this] execVM "c130cargo.sqf";veh = [this, 60, 600, 0, TRUE, FALSE,"res= [this] execVM ""c130cargo.sqf"""] execVM "vehicle.sqf";

This is the C-130J Carpet Bomber script.
Code: [Select]
// 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;


Please could help me out with this.

Thanks


« Last Edit: 31 Jul 2009, 09:09:58 by bedges »