OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started 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
-
It's pretty simple to make, you could use something like this:
_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.
-
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)
-
Thanks thats great!