I would like to start this post with saying big thanks to Nils for his donation!
Hi KillzoneKid! Thanks a lot for your great tutorials in support for the community. Love your work, learned a lot! Personally hoping for one on mini-map rotation that you have been teasing us with ๐ Or some some way to turn off the pesky black GPS location lines on a map control element when in a helicopter. Thanks & Best Regards, Gundy (on BI-Forums)
Well, thank you, Nils, and I think I have something really awesome and equally valuable to share this time. I have discovered this recently by accident and as far as I can tell this discovery provides a solid method for overriding LMB (Left Mouse Button). Actually, more precisely, it overrides default fire control, which usually associated with LMB.
Fire is associated with input action “DefaultAction”. If you create an addAction and bind it to “DefaultAction” (see BIKI page for addAction for more info) ย it would override default firing. Try it yourself:
What’s more, it would override fire action regardless of input device used, be it keyboard, mouse or joystick. I doubt this could be done in any other way, like with UI event handlers for example. I have been playing with it and made a quick weapon jamming mock up just to see if it works:
Unfortunately there is no way of distinguishing one weapon from another, as some kind of weapon id is not available to mission makers, so I’m putting this attempt on hold for now. This is the script I used in the video if anyone wants to play around with:
Enjoy,
KK
EDIT: There have been some changes on DEV branch, and “Take” event handler does not return player object as weapon holder anymore, but “Supply40”, “Supply140”, etc weaponholder, I presume depending on container used, uniform vest etc. Here is quick workaround to Un-jam routine. I wish there was dedicated “reload” EH for this: