Jump to content
Sign in to follow this  
DankanX37

Disable use of mines

Recommended Posts

I want to create a mission where you can place mines only after you've completed a task, I know I can add the mines to the player inventory, but is there an EH that triggers when a mine is placed? I've seen in "Resist" campaign he placed dozens of triggers to check if there was a mine, but it won't work for me.

Share this post


Link to post
Share on other sites

I think the Fired EH will catch mine placement.

Share this post


Link to post
Share on other sites

I got it, I was using "_weapon" instead I had to use _ammo.

Share this post


Link to post
Share on other sites
mines = ["ATMine_Range_Ammo","APERSMine_Range_Ammo","APERSBoundingMine_Range_Ammo","SLAMDirectionalMine_Wire_Ammo","APERSTripMine_Wire_Ammo","ClaymoreDirectionalMine_Remote_Ammo","SatchelCharge_Remote_Ammo","DemoCharge_Remote_Ammo"];




player addEventHandler ["Fired", {

    params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];

if (_ammo in mines) then

{

hint "Player placed a mine";

};

}];

 

  • Like 2

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  

×