Jump to content
Sign in to follow this  
CptBBQ

Create a (big) explosion midair

Recommended Posts

Hi all!

I´ve got a (hopefully) small problem with a mission I´m planing.

Basically I want to make a scud missile detonate prematurely on launch. So the explosion would have to occur about 10m above the ground where the warhead would be located. Problem is, all noteworthy explosives I found are bombs which fall down before detonating. Too bad the missile itself doesn´t collide with other objects...

I currently use the ammo class 'ace_fuelexpbig' as a substitute which is too small for my needs. The only other way I can think of would be a nukeAirBurst, which again is a little to big ^^

Any input appreciated :)

Cheers,

bbq

Share this post


Link to post
Share on other sites
Problem is, all noteworthy explosives I found are bombs which fall down before detonating.

Try creating two bombs in the same place. They will collide and explode.

Share this post


Link to post
Share on other sites

Heh, fun and simple! I´ll try that.

Thank you.

Share this post


Link to post
Share on other sites

Hey there!

I´ve got a confession to make... ^^

I came along with actually trying this just now :o

And it totally doesn´t work like I hoped it would...

Somehow the bombs always appear with enough of a delay to prevent them from colliding. I already tried creating the bombs in the sky and setPos-ing them to an 'invisible H' at the desired position. I even setPos´ed the second bomb to the position of the first one. But nothing worked...

Maybe my computer is too slow for this approach... :(

Could someone of a somewhat 'cleaner' way to do this?

Thanks in advance!

Cheers,

CptBbq

Share this post


Link to post
Share on other sites

Same too.

I also wanna to know and whatever camcreate or createVehicle are all useless, I have to choose to write some script to drop some and smoke in the mid of the sky with explosive sound, is there any simplier way?

Share this post


Link to post
Share on other sites

This works fine:

_pos = getMarkerPos "bomb";
_explosive = "Sh_100_HE";
_bombLocX = _pos select 0;
_bombLocY = _pos select 1;
_bombLocZ = 60;
_warhead = createVehicle [_explosive, [_bombLocX,_bombLocY,_bombLocZ], [], 0, "CAN_COLLIDE"];
_holder = createVehicle ["weaponHolder", [_bombLocX,_bombLocY,_bombLocZ], [], 0, "CAN_COLLIDE"];
_warhead setPosATL (getPosATL _holder);

Change the 60 to whatever altitude you want, I just wanted to prove that the bomb blew up in the air. The CAN_COLLIDE parameter is not really needed if you just want to blow up a bomb in the air, but if you decide to blow one up inside a plane (or other model), you need CAN_COLLIDE.

Also, you can change explosive to "ARTY_SmokeShellWhite" to get smoke, but keep in mind that smoke falls to the ground.

Share this post


Link to post
Share on other sites

Awesome! Thanks a lot, AZCoder.

I just did a little tweak and changed

_warhead = createVehicle [_explosive, [_bombLocX,_bombLocY,_bombLocZ], [], 0, "CAN_COLLIDE"];

to

_warhead = createVehicle [_explosive, [0,0,1000], [], 0, "CAN_COLLIDE"];

that way the bomb itself isn´t visible to the player at any time.

Cheers,

Bbq

Share this post


Link to post
Share on other sites
This works fine:

_pos = getMarkerPos "bomb";
_explosive = "Sh_100_HE";
_bombLocX = _pos select 0;
_bombLocY = _pos select 1;
_bombLocZ = 60;
_warhead = createVehicle [_explosive, [_bombLocX,_bombLocY,_bombLocZ], [], 0, "CAN_COLLIDE"];
_holder = createVehicle ["weaponHolder", [_bombLocX,_bombLocY,_bombLocZ], [], 0, "CAN_COLLIDE"];
_warhead setPosATL (getPosATL _holder);

Change the 60 to whatever altitude you want, I just wanted to prove that the bomb blew up in the air. The CAN_COLLIDE parameter is not really needed if you just want to blow up a bomb in the air, but if you decide to blow one up inside a plane (or other model), you need CAN_COLLIDE.

Also, you can change explosive to "ARTY_SmokeShellWhite" to get smoke, but keep in mind that smoke falls to the ground.

Hey, thanks AZcoder!

I just wanna to know what is weaponholder?

Share this post


Link to post
Share on other sites

Weaponholder is an invisible virtual weaponbox where you can place stuff like weapons.

:rolleyes:

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  

×