terox 316 Posted March 8, 2015 As the title states. I am wanting to attach an eventhandler that fires when a player selects the "Deactivate mine" option in the player user-action menu. I would really appreciate a solution to this. Thanks in advance Share this post Link to post Share on other sites
f2k sel 164 Posted March 9, 2015 I'd hazard a guess that it's not possible, some mines change their state from alive to not alive when deactivated and some even move position which could be checked for. There are some that do neither so it could still be a problem. We really need a way to return default actions when pressed, you can sort of find out when an action is used but not the specific one through. Share this post Link to post Share on other sites
terox 316 Posted March 9, 2015 (edited) The status of the mine isn't an issue, I'm wanting to run some code when the user action menu "Deactivate mine" is selected. The user action menu is a dialog control and the menu would be most likely a list box, activeText or button, so what i really need is the IDC number of the dialogue control or which B.I addon it is defined in and will probably be able to return a value, string or data for that control when it is run using a eventhandler (Hopefully anyway) Edited March 9, 2015 by Terox Share this post Link to post Share on other sites
terox 316 Posted March 11, 2015 Bump still unsolved Share this post Link to post Share on other sites
epicgoldenwarrior 11 Posted March 11, 2015 U could use A3 explosives script idk if it does what u want tho Share this post Link to post Share on other sites
cuel 25 Posted March 11, 2015 Have you tried what happens to the mines when they are deactivated? Maybe they go null / a new one is spawned in etc. Maybe that could help. Share this post Link to post Share on other sites
bull_a 44 Posted March 11, 2015 I dont know what the display and idc codes are for the Action Menu are, perhaps someone else can find this, but this is how I would do it _control = controlNull; // replace this with the control from Action Menu _control ctrlAddEventHandler ["LBSelChanged",{ _ctrl = _this select 0; _selection = _this select 1; _text = _ctrl lbText _selection; if (_text isEqualTo "Deactivate Mine") then { // Insert your code here }; }; The above code will fire once you select the deactivate mine option in the Action Menu Regards, Bull Share this post Link to post Share on other sites
terox 316 Posted March 11, 2015 (edited) Thx Bull. I suppose i'll have to scan through all the B.I addons to try and find the IDC Edited March 11, 2015 by Terox Share this post Link to post Share on other sites
f2k sel 164 Posted March 12, 2015 Your assuming it's an addon, I'm sure someone would have found it by now if it was possible, I belive it's part of the actual engine and so hard coded. You can see all the Displays by using hint str alldisplays commands and if in a loop you can see the numbers change when inventory is opened. Then you can see the contols hint str (allControls findDisplay 46) Other display numbers are 0,12,26,46,63 and 602 (inventory) None of which seem related to Action Menu Share this post Link to post Share on other sites
cuel 25 Posted March 12, 2015 How'd AGM disable it ? Maybe check their code on github Share this post Link to post Share on other sites
terox 316 Posted March 12, 2015 How'd AGM disable it ? Maybe check their code on github you can disable the entire user action menu using inGameUISetEventHandler ["Action","hint 'Entire action menu disabled'"]; Share this post Link to post Share on other sites