Jump to content
Sign in to follow this  
Khalashnikovf

Ammo exploeding in air?

Recommended Posts

Hi, another day,another problem.

I cant in any way set created shell in explode.

Is there any way how to do it in Air?

Some type of ammo maybe? but which one and how to write it?

I know there is possibility to lay down pipebomb and touch off them, but dont know how to touch them of if they are created by createvehicle.

Share this post


Link to post
Share on other sites

Hi Khalashnikovf

Spawn to explosives at same spot.

Also setdammage the object would probably do it.

Kind Regards walker

Share this post


Link to post
Share on other sites

bomb = "SmallSecondary" createVehicle [getpos targ select 0,getpos targ select 1,200];

place the code in a gamelogic and name targ or place in a trigger.

That will spawn a small explosion in the air.

a couple of other explosions that will work are

"HelicopterExploSmall"

"HelicopterExploBig"

These are just effects and I don't think they will damage anything.

.

Share this post


Link to post
Share on other sites
These are just effects and I don't think they will damage anything.

They hurt. :)

Share this post


Link to post
Share on other sites
bomb = "SmallSecondary" createVehicle [getpos targ select 0,getpos targ select 1,200];

place the code in a gamelogic and name targ or place in a trigger.

That will spawn a small explosion in the air.

a couple of other explosions that will work are

"HelicopterExploSmall"

"HelicopterExploBig"

These are just effects and I don't think they will damage anything.

.

Nice,not quite undestand it ... but will try and will report.

---------- Post added at 20:00 ---------- Previous post was at 19:09 ----------

Like I thought, dont understand what to do with that gameLogic,etc. Could you describe it more in details pls?

I most likely have got this in init file only for just one explosion of helicopter tail.

Something like you write is practicaly same like from BI tutorial recently added onto Youtube.

_explosion1 = "SmallSecondary" createVehicle [(getpos hawk6 select 2),(getpos hawk6 select 2),(getpos hawk6 select 2)];

so why its not working just like that only because of "SmallSecondary" ?

EDIT: Forget it,working already, I just need to somehow put it into script :)

Edited by Khalashnikovf

Share this post


Link to post
Share on other sites

This is more or less the same thing in a script simulating flak.

To use it save the code as flak.sqf

In a trigger

set it to repeating

condition

getpos plane select 0 > 40

on act

nul=[Plane,150,0.5] execVM "flak.sqf" 

Plane would be hawk6.

It the aircraft flies above 40meters the script is triggered

// usage (in a trigger or in the units init line)
// trigger condition  getpos plane select 0 > 40 
// nul=[Plane,150,0.5,40] execVM "flak.sqf" 
//  
// Plane is the name of the target aircraft
// 50 is the radius of the flak 
// 0.5 rate of fire
// 40  lowest height it will fire at target 
// 
//_flaktype   = "SmallSecondary";
//_flaktype   = "grenade";
//_flaktype   = "Sh_125_SABOT";
//_flaktype   = "Sh_125_HE";  //works best

_unit       = _This Select 0;
_spread   = _This Select 1;
_rate       = _This select 2;
_height    = _This select 3;

_flaktype   = "Sh_125_HE";

while {alive _unit and getpos _unit  select 2 >_height} do
{
_flakLoc = GetPos _unit;
 _flakLocX =  (_flakLoc select 0) + (random _spread)-_spread/2;
  _flakLocY = (_flakLoc select 1) + (random _spread)-_spread/2;
  _flakLocZ = (_flakLoc select 2) + (random _spread)-_spread/2;
  if (_flakLocZ < _height) then 
  {
    _flakLocZ = _height + (random _spread/2); 
   };  
   _flak1  = _flaktype createVehicle [_flakLocX,_flakLocY ,_flakLocZ];
   _hammer = "weaponholder" createVehicle [_flakLocX,_flakLocY ,_flakLocZ];
   _hammer  setpos [_flakLocX,_flakLocY ,_flakLocZ];

   sleep _rate;
   deletevehicle _flak1 ;
   deletevehicle _hammer;

};

It's not perfect but it does work, this does use real ammo which has to be hit with an object to force it to explode "weaponholder" which is invisible.

Share this post


Link to post
Share on other sites

Yeah, when I saw that explosion from SmallExplode I had on my mind FLAK fire. Will try this, I need explosions for effect,so this will be good enough after my little modification :)

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  

×