OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: bardosy on 03 Oct 2007, 14:52:49
-
How can I create an explosition in the air?
I mean I want a small (or not too small) explosition above the ground.
I tried to create a handgrenade in 80m above the ground, but it was falled down and explode on the ground.
Then I tried to damage it with setDammage, but same effect.
-
Search result (http://www.ofpec.com/forum/index.php?topic=28855.msg196827#msg196827) :P
Other way could be to fake the explosion with particles.. :dunno:
-
_bomb = "Bomb" createVehicle [x,y,z];
_bomb setPos [x,y,z];
_bomb setDamage 1;
Sleep 1;
deleteVehicle _bomb
-
Thanks!
-
I need a less powerful explosion in the air (the "bomb" is way to big for my needs), like from a "Sh_105_HE".
Is there a way to do that?
-
Try this
_b2 = "Computer" createVehicle _pos;
_b2 setPos _pos;
_b1 = "M_Strela_AA" createVehicle _pos;
sleep 0.2;
deleteVehicle _b2;
deleteVehicle _b1;
-
Should of thought of that, I made nades like 50m up and predicting your movement to create explosions in the air like flak... :whistle: :P
-
Thanks mando, you got me a lot closer to the solution. However, I still only had about 50% success of the collision taking place between the two objects. I then changed it to create the bomb at position returned by modelToWorld, and it seems to work every time. The idea here is that the bomb is created at the center of the collision object, rather than its position (which is probably just below the actual object). Here's the modified code:
_b2 = "computer" createVehicle _pos;
_b2 setPos _pos;
_b1 = "M_Stinger_AA" createVehicle (_b2 modelToWorld [0,0,0]);
~.2
deleteVehicle _b2;
deleteVehicle _b1;
-
Good point :good:. You might also try with smaller objects like the roadcone or a mine.