Jump to content
Sign in to follow this  
aquinn2005

Enemy/Objects explode when shot

Recommended Posts

Hi, I'm trying to make a fun mission with my pals in which the enemy personnel will explode when shot/killed. I have tried doing an attachto script in the init field with a claymore but it's not working exactly like i want (unless shooting with a .50 cal it wont explode in one shot, and if you have it attached when he crouches or goes prone it says floating in the air). I saw someone wanted a trigger done when someone died and was suggested an "!alive unitname" script. I'm currently trying to tie that and the suicide bomber "_bomb = "Bo_Mk82" createVehicle getpos badguy" to get what I want but no luck so far. Thanks!

Share this post


Link to post
Share on other sites

unitName addEventHandler ["Killed","'ARTY_Sh_122_HE' createVehicle (getpos _this select 0)"];

Try that. Edit unitName accordingly, it'll spawn a huge Artillery Shell (122mm) at the guys position once he's dead.

Share this post


Link to post
Share on other sites

I believe if your planning on making this script for MP missions you will need to add ISServer to avoid it spawning one for every player. But i may be mistaken.

Share this post


Link to post
Share on other sites
if (isServer) then {
{
    if (side _x == east) then {
	_x addEventHandler ["Killed",{'ARTY_Sh_81_HE' createVehicle (position (_this select 0))}]; 
    }
} foreach allUnits;
};

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×