Jump to content
Sign in to follow this  
TraxusIV

Artillery items usable with createVehicle in a barage script

Recommended Posts

Ok, so I found this nice little script over at Armaholic, posted by F2kSel:

//null=[5,400,25,80] execvm "bombs.sqf"
if (!isServer) exitWith {};

 private "_ammo";

_ammotype = _this select 0; // type of ammo
_height   = _this select 1; // height of drop
_rounds   = _this select 2; // how many
_spread   = _this select 3; // area

_pos  = screenToWorld [0.5,0.5];// land position 
if (!isnull cursortarget) then { _pos = getpos cursortarget};// building / object position

switch (_ammotype) do {
case 0:{_ammo = "R_57mm_HE"};
     case 1:{_ammo = "Sh_105_HE"};
     case 2:{_ammo = "Bo_GBU12_LGB"};
     case 3:{_ammo = "M_Stinger_AA"};
     case 4:{_ammo = "R_80mm_HE"};
     case 5:{_ammo = "ARTY_Sh_122_HE"};
     case 6:{_ammo = "Sh_85_AP"};
     case 7:{_ammo = "Bo_FAB_250"};
     case 8:{_ammo = "Grenade"};
           };

for "_x" from 1 to _rounds do {
 sleep random 0.8;
  _bomb = _ammo createVehicle [( _pos select 0)+(random _spread)-_spread/2, (_pos select 1)+(random _spread)-_spread/2,_height];
_bomb setVectorUp [0, 9, 0.1];
};

It spawns in an artillery barage at a particular height above the spot you're looking at. Now, I've been going through the config browser and trying all sorts of items from cfgAmmo, and cfgVehicles, and I can't find any that will work, besides Grenade, and that honestly doesn't seem to be doing any damage to troops on the ground where it hits. I've run the script via radio call 10 -20 times on the same squad at distance, and all they do is flinch a little. Not one kill. ***EDIT*** the R_80mm_HE also appears to work, and well! ***/EDIT*** But I digress. Does anyone know which config entries might work for this? And more importantly, specifically which config file they are stored in? I'm rather lost surfing through those files.

Thanks,

Trax

Edited by TraxusIV

Share this post


Link to post
Share on other sites

I suggest you look at the kamino mortars code in the helicopter showcase from the alpha. I can't remember the name exactly but there's a class in there called bis_explosions or something that creates explosions at the location of every ammo crate once the player hits them with his helicopter bullets.

I think the explosion class is something like HelicopterExplosionSmall or something.

edit: just looked at the code and this is the explosion they created:

[_unit,"HelicopterExploSmall"] call Bis_createExplosion

in other words, try using "HelicopterExploSmall" as your classname for the shell.

Edited by LeYuno

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×