Jump to content
Sign in to follow this  
Nailpolish

Spawning a bomb on player if entering marker area

Recommended Posts

How do I set up an event handler or trigger to spawn a bomb on any player entering the area of a trigger or marker?

Share this post


Link to post
Share on other sites

On trigger activation:

{ expl = "APERSMine_Range_Ammo" createVehicle getPos _x; expl setDamage 1; } forEach thisList;

Share this post


Link to post
Share on other sites

That's neat and all but how do I accomplish the same with the bomb command?`

and I know how to use foreach with arrays but how does it work with triggers?

Please explain more in depth

Share this post


Link to post
Share on other sites

With this command you creating explosive under every unit in tigger area and then destoing it.

Instead of "APERSMine_Range_Ammo" place any ammo classname. You can find them here: https://community.bistudio.com/wiki/Arma_3_CfgMagazines

"thisList" is a magic variable for triggers, contains array of all units inside trigger area.

Edited by Champ-1

Share this post


Link to post
Share on other sites

and if I want the trigger to only activate for ground vehicles (mraps and the like) and not aircraft, how can I do that?

Share this post


Link to post
Share on other sites

There is this thing called isKindOf. It tests if unit is of given type.

{ 
if (vehicle _x isKindOf "LandVehicle") then {
	expl = "APERSMine_Range_Ammo" createVehicle getPos _x; 
	expl setDamage 1; 
};
} forEach thisList;  

This will not kill infantry and air units.

Edited by Champ-1

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×