OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: punisher on 08 Jul 2011, 21:54:13

Title: Explosive barrel?
Post by: punisher on 08 Jul 2011, 21:54:13
Is an explosive barrel script possible? Like when it gets shot theres an explosion
I know it was for ofp and possibly arma1 but for arma2?
Thanks
Title: Re: Explosive barrel?
Post by: Zipper5 on 08 Jul 2011, 22:18:54
It's pretty simple to make, you could use something like this:
Code: [Select]
_barrel = _this select 0;
_explosion = "Sh_125_HE";

waitUntil {damage _barrel > 0};

_barrel setDamage 1;
_explosion createVehicle [(getPos _barrel select 0),(getPos _barrel select 2),(getPos _barrel select 3)];
Save that as a SQF script and execute it in the init lines of the barrels.
Title: Re: Explosive barrel?
Post by: F2kSel on 08 Jul 2011, 23:55:41
I made a little one that adds a bit of velocity and sound.

Just shoot one of the barrels.

Demo
http://www.sendspace.com/file/vhoovg (http://www.sendspace.com/file/vhoovg)
Title: Re: Explosive barrel?
Post by: punisher on 11 Jul 2011, 17:07:16
Thanks thats great!