OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: CAS_Daniel on 18 Jun 2007, 21:30:42

Title: Making explosions
Post by: CAS_Daniel on 18 Jun 2007, 21:30:42
Could anyone help me out/point me in the right direction for the following, would be much appreciated:

I've made a raid mission for my unit, basically I want them to make a mess of the enemy camp. However when you satchel charge barrels and ammo boxes, they just quietly set on fire. And I want them to pop and go boom.

Cheers!

Dan
Title: Re: Making explosions
Post by: CAS_Daniel on 19 Jun 2007, 01:55:49
Okay, I figured out how to make a barrel go bang and rocket upwards when you kill it, currently got a trigger linked to it with this in the On Act line:

Code: [Select]
bomb = "GrenadeHand" createvehicle getpos yellowbarrel ; yellowbarrel setvelocity [1,1,15]
Now I know this is very sloppy, and triggers can eat CPU, so could anyone help me fit this into a nice efficient script? And does anyone have any other good particle effects up their sleeves?
Title: Re: Making explosions
Post by: JasonO on 19 Jun 2007, 13:53:19
Barrel INIT line:
Quote
[this] exec "boomcheck.sqs"

boomcheck.sqs:
Quote
_obj = _this select 0

#check
?(getdammage _obj) > 0.8 : goto "boom"
~1
goto "check"

#boom
bomb = "GrenadeHand" createvehicle getpos _obj ; _obj setvelocity [1,1,15]
exit
Title: Re: Making explosions
Post by: CAS_Daniel on 19 Jun 2007, 14:10:27
Just what I was after, thanks.  :)