Jump to content
Sign in to follow this  
darkheart232

How to make artillery go off when player dies

Recommended Posts

So I'm making a hunger games type of arena, and I would like to know if it's possible to have a cannon, like some artillery or something, go off when one of the players die to let the others know of the event. I'm sure it would involve using triggers and such, but idk the proper way to set that up. Any advice would be helpful.

Share this post


Link to post
Share on other sites

No replies... Well, I managed to set the trigger to sound an explosion on "Sniper1's" death. So it works. Only problem is, it keeps on exploding after he dies. Anybody know how to make it stop after the first initial explosion?

Share this post


Link to post
Share on other sites

Without knowing how you set the trigger up it's hard to say, if you have it set to repeating turn it off.

Share this post


Link to post
Share on other sites

Tryout the sound in trigger, environment etc. I believe one category is for repeating sounds. See if you can find the same sound in another category.

Share this post


Link to post
Share on other sites

Place an M119 or D30 and name it gun1 - put this in each players init field:

this addEventHandler ["killed", "[_this select 0, _this select 1, gun1] spawn {_vic = _this select 0; _klr = _this select 1; _gun = _this select 2; hint format['%1 Killed by %2',name _vic,name _klr]; sleep 3; _gun action ['useWeapon', _gun, (gunner _gun),0];};"];

or better in init.sqf:

{_x addEventHandler ["killed", "
[_this select 0, _this select 1, gun1] spawn {
 _vic = _this select 0; 
   _klr = _this select 1; 
     _gun = _this select 2; 
hint format['%1 Killed by %2',name _vic,name _klr];
 sleep 3; 
   _gun action ['useWeapon', _gun, (gunner _gun),0];};
 "]
} forEach playableUnits;

Put this in gun1 init field to delete fired round (you get the cannon firing blanks):

this addEventHandler ["fired", "deleteVehicle (_this select 6);"];

If you want the barrel to point up in the air - put an invisible H 200m in air and doWatch / doTarget etc

Edited by Mattar_Tharkari

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  

×