Home   Help Search Login Register  

Author Topic: Mid air explosions  (Read 2688 times)

0 Members and 3 Guests are viewing this topic.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Mid air explosions
« on: 03 Mar 2007, 22:18:52 »
What works in OFP doesnt in ArmA:

Code: [Select]
_dir = getDir player
_pos = [(getPos player select 0)+sin(_dir)*100,(getPos player select 1)+cos(_dir)*100, 100]
_b1 = "Bo_GBU12_LGB" createVehicle _pos
_b2 = "Bo_GBU12_LGB" createVehicle _pos
exit

So how to create a big explosion in the middle of the air?

Offline FreeBird

  • Members
  • *
Re: Mid air explosions
« Reply #1 on: 03 Mar 2007, 22:33:33 »
Try this:

Code: [Select]
_relPos = [0,0,100]
_pos = player modelToWorld _relPos
_b1 = "Bo_GBU12_LGB" createVehicle (_pos)
 

Edit:this creates a bomb,not an explosion.
It explodes when the bomb hits the ground.
Call [This,Birth,School,Work,Death]execVM "Storyofmylife.sqf"
(_this select 1)ObjStatus "DONE";(_this select 2)ObjStatus "DONE";(_this select 3)ObjStatus "ACTIVE";(_this select 4)ObjStatus "HIDDEN";
if not((_this select 0) IsKindOf "Human")ExitWith{PlayMusic"Goodbye Cruel World"}

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mid air explosions
« Reply #2 on: 03 Mar 2007, 22:44:37 »
May be I didnt explain the problem too clearly. The target is to create a mid air explosion, a mid air boom.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Mid air explosions
« Reply #3 on: 04 Mar 2007, 10:05:19 »
Weird..
It seems that somehow the bombs just won't collide with each other.. :dunno:

Tested a whole lotta more different ordnance and none of them work in this scenario..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mid air explosions
« Reply #4 on: 04 Mar 2007, 10:20:58 »
SetDammage 1 doesnt affect ordenance either  :dunno:

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mid air explosions
« Reply #5 on: 05 Mar 2007, 09:10:57 »
Found a workaround that works based on an static object named "Bomb" as detonator, it seems to work well with any ordenance:

Code: [Select]
_dir = getDir player
_pos = [(getPos player select 0)+sin(_dir)*200,(getPos player select 1)+cos(_dir)*200, 50]

_b2 = "Bomb" createVehicle _pos
_b2 setPos _pos
_b1 = "M_Ch29_AT" createVehicle _pos
~0.05
deleteVehicle _b2
exit

Still 0.05 secs wait is needed before deleting the "detonator" object.

Offline satexas69

  • Members
  • *
Re: Mid air explosions
« Reply #6 on: 06 Mar 2007, 19:39:19 »
Mandoble,

Can you give an example of how to use that script?

Thanks

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mid air explosions
« Reply #7 on: 06 Mar 2007, 20:08:32 »
Init field of player unit:
Code: [Select]
this addAction ["Test explosion", "test_explosion.sqs"]
test_explosion.sqs
Code: [Select]
_dir = getDir player
_pos = [(getPos player select 0)+sin(_dir)*200,(getPos player select 1)+cos(_dir)*200, 50]

_b2 = "Bomb" createVehicle _pos
_b2 setPos _pos
_b1 = "M_Ch29_AT" createVehicle _pos
~0.05
deleteVehicle _b2
exit