mattsmith94 10 Posted October 10, 2015 I want to write a script which is triggered by a weapon firing. In this case the weapon is vehicle mounted (Tank Main Gun) but could also be extended to Rocket Launchers or Placed Explosive Devices. Could any one please advise how to detect when a weapon has been fired. Thanks Share this post Link to post Share on other sites
schadler17 36 Posted October 10, 2015 this addEventHandler ["fired", {code}]; Share this post Link to post Share on other sites
mattsmith94 10 Posted October 10, 2015 this addEventHandler ["fired", {code}]; Perfect, Thank You Share this post Link to post Share on other sites
Joe98 91 Posted October 11, 2015 The thing is that a tank has more than one weapon. Why would this code apply to the tank main gun rather than another weapon? . . Share this post Link to post Share on other sites
dreadpirate 173 Posted October 11, 2015 The thing is that a tank has more than one weapon. Why would this code apply to the tank main gun rather than another weapon? . . In the code of the event handler, you can check which weapon was fired and take the appropriate action..... https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#Fired Share this post Link to post Share on other sites
mattsmith94 10 Posted November 10, 2015 The thing is that a tank has more than one weapon. Why would this code apply to the tank main gun rather than another weapon? . .because its to do with backblast, concussion ect Share this post Link to post Share on other sites