Home   Help Search Login Register  

Author Topic: Flak/ air explosion  (Read 1382 times)

0 Members and 1 Guest are viewing this topic.

Offline granQ

  • Contributing Member
  • **
    • Anrop.se
Flak/ air explosion
« on: 09 Nov 2008, 23:57:58 »
Hello..

Need to get some bang in air..

_flak = _fxshell createVehicle [_pX, _pY, _pZ]
_flak1 = _fxshell createVehicle [_pX, _pY, _pZ]
~0.001
_flak setpos getpos _flak1


doesn't work.. they just spawn and fall down, causing an explosion on ground, not wanted.

Any suggestions?

Cura Posterior

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Flak/ air explosion
« Reply #1 on: 10 Nov 2008, 03:15:37 »
Ammo won't collide with other ammo. You could try creating a "weaponHolder" (invisible, but causes collisions) at the position of the ammo (_fxshell) you have created and leave it to collide for a fraction of a second.

Alternatively, use the "bomb" class, although that is rather limited in that it only has one "size":
Code: [Select]
_bomb = "bomb" createVehicle _pos;
_bomb setPos _pos; // Need to setPos after creation, because bomb will always be created on the ground.
_bomb setDamage 1;
sleep 0.05;
deleteVehicle _bomb; // Need to delete it afterwards, since otherwise it will stay in the air burning.
« Last Edit: 10 Nov 2008, 03:18:20 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline granQ

  • Contributing Member
  • **
    • Anrop.se
Re: Flak/ air explosion
« Reply #2 on: 10 Nov 2008, 09:30:33 »
thanks alot :good:

Bomb worked but was way to powerful for my 40 mm bofors gun.

However the weaponholder idea was perfect.
Cura Posterior