Jump to content
Sign in to follow this  
jakerod

Plane Explosion

Recommended Posts

I need a plane to get hit by a strela after it has taken off from the runway. It is for use in the cutscene so I don't actually have to watch the missile hit the plane I just need a missile to hit the plane meaning I could use createvehicle to just place one there.

The problem I have been having is when I use createvehicle to try to get it on the plane it must spawn below the plane and fall to the ground. I have been using an LGB as a test to get it to work right.

So in short, how can I make the plane look like it has been damaged by a missile? I need the explosion cloud to be where the plane was hit and for the plane to be damaged (which I can easily do via setdamage). The cloud and sound is the main problem.

Using a man with a strela is too unreliable too.

Share this post


Link to post
Share on other sites

Can you blend the two? Place a trigger in an area just after takeoff and set the plane damage to 0 for the explosion. Then you can just record a guy on the ground and record him firing a Strella and blend the two videos.

Share this post


Link to post
Share on other sites
Can you blend the two? Place a trigger in an area just after takeoff and set the plane damage to 0 for the explosion. Then you can just record a guy on the ground and record him firing a Strella and blend the two videos.

There won't be an explosion until the plane hits the ground so it seems a bit weird. The plane will all of a sudden start smoking for no reason.

Okay apparently it does create an explosion. But I also don't want the plane to completely explode. I just want it to get damaged by the strela, pilot ejects and the plane goes smoking into the ground. Sorry should've been more specific before.

Edited by Jakerod

Share this post


Link to post
Share on other sites

Use a AA-Soldier.

Put him somewhere he has a good sight and shootposition. Set him on "never fire" but "doTarget" on the plane. At the end of the runway a trigger with "doFire". that should work.

Share this post


Link to post
Share on other sites
Use a AA-Soldier.

Put him somewhere he has a good sight and shootposition. Set him on "never fire" but "doTarget" on the plane. At the end of the runway a trigger with "doFire". that should work.

He isn't reliable though. I put 10 of them there and they miss everytime. I'll admit the angle isn't perfect but I need it to work for the sake of the cutscene/plot.

Share this post


Link to post
Share on other sites

I don't see why this shouldn't simply be done with an createvehicle/setpos combination ?

If you just want the explosion that is.

If want to see the missile flying, well ... you could still use createvehicle... but in this case you'll also need some maths to guide the missle to the target.

just a snipplet, maybe you can get it to work with that:

	_apos = getposasl _this select 0;
_bpos = _this select 0 modelToWorld [0,-100,0];
_bomb = "R_Hydra_HE" createVehicle _bpos;
_bomb setpos _bpos;
sleep 0.05;
_bpos = getposasl _bomb;

_xdis = (_apos select 0) - (_bpos select 0);
_ydis = (_apos select 1) - (_bpos select 1);
_zdis = (_apos select 2) - (_bpos select 2);

_bomb setvectorup [0.1,1000,0.1];
_bomb setvectordir [_xdis,_ydis,_zdis+0.5];

Share this post


Link to post
Share on other sites

So how does it know where to put it relative to the plane?

Nevermind I got it. For whatever reason I didn't think to execute it as the unit. Don't use scripts too much. Thank You.

I still can't get it to work. If the pilot decides to do something slightly different it all falls apart. I've only had two successful tests so far both with a slower acctime.

Edited by Jakerod

Share this post


Link to post
Share on other sites

Setpos getpos works upto a point.

A few things only need to be set to the object (plane) to take it out such as "HelicopterExploSmall"

Other objects seem to need something to collide with other than the plane or they just fall to the ground.

Some bombs will explode in the air and also on the ground at the same time.

When you do find an explosive that works correctly you find that it can have virtually no effect on the plane if it's moving quickly.

I still can't find a perfect result.

I think missiles will be the best choice but they will have to be set to the right direction to work.

Share this post


Link to post
Share on other sites

Is there anyway to just make it detonate as soon as it spawns?

Share this post


Link to post
Share on other sites

This works but needs to be much better.

// null=[plane] execVM "AirExpl.sqf"

_unit = _this select 0;
_ammo   = "HelicopterExploSmall";
  _striker  = "weaponholder" createVehicle GetPos _unit;
  _striker  setpos GetPos _unit;
sleep 0; // set to around 0.17 for damage, not very accurate.
  _bomb = _ammo createVehicle (_striker modelToWorld [0,0,0]);

Share this post


Link to post
Share on other sites

Well that detonates but it blows the crap out of the plane. Fuel explosion doesn't seem to work and obviously the big helicopter one isn't any better.

And after writing all of that: "SmallSecondary" seems to work if I use it in conjunction with plane setdamage .9. The explosion is a little quiet but it will work. Thanks for your help guys.

Share this post


Link to post
Share on other sites

I realise you might already have your answer but this is what I do.

Put this in your planes init:

gamelogicname attachTo [this, [0,0,0]]

change the [0,0,0] to put the gamelogic forward of the position on the plane you want hit as the delay of the explosion with not look right (you can keep moving the gamelogic position til you get the desired look).

In a trigger that fires when you want the explosion:

pos = getPos gamelogicname; b2 = "Bomb" createVehicle pos;
b2 setPos pos; b1 = "Bo_GBU12_LGB" createVehicle pos;
b2 setDamage 1; deleteVehicle b1;

Change the "Bo_GBU12_LGB" with your desired ordinance, i.e. a strela rocket missile for realism.

"M_Igla_AA" is the ordinace name of a russian SAM.

Hope I helped or gave you another option.

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  

×