{"name":"Arma 3: Event Handlers/inGameUISetEventHandler","title":"Arma 3: Event Handlers/inGameUISetEventHandler","type":"topic","url":"https://community.bistudio.com/wiki/Arma_3:_Event_Handlers/inGameUISetEventHandler","revid":329058,"updated":"2022-07-21T22:47:14Z","aliases":[],"markdown":"In Game UI Event Handlers trigger when user scrolls or activates in game action menu. Additionally a Boolean or Nothing is expected to be returned by the assigned code. If the assigned EH code returns true, default engine action is overridden. For all other available EHs see the main page.\n\n> [!IMPORTANT]\n> Arguments were introduced with Arma 3 v1.50.\n\n### Related Commands\n\n- inGameUISetEventHandler\n\n### Examples\n\n```sqf\ninGameUISetEventHandler [\"Action\", \"hint 'Lights, Camera, Action!'\"];    // add EH\ninGameUISetEventHandler [\"Action\", \"\"];                                    // remove EH\n```\n\n### Events\n\n| Class | Description | Arguments - since Arma 3 v1.50 |\n|---|---|---|\n| **PrevAction** | Triggers on mouse wheel scroll up. | `params [\"_target\", \"_caller\", \"_index\", \"_name\", \"_text\", \"_priority\", \"_showWindow\", \"_hideOnUse\", \"_shortcut\", \"_visibility\", \"_eventName\"];`<br>- Object - target object to which action is attached<br>- Object - caller object, basically player<br>- Number - index of the action in action menu (0 - top most)<br>- String - engine based action name (\"User\" for user added actions)<br>- String - localized action plain text as seen by the caller<br>- Number - action *priority* value<br>- Boolean - action *showWindow* value<br>- Boolean - action *hideOnUse* value<br>- String - action *shortcut* name or \"\"<br>- Boolean - action menu visibility (on first scroll or action press the menu is still invisible, so no action is performed, only menu is shown)<br>- String - EH event name |\n| **Action** | Triggers on action key press. | `params [\"_target\", \"_caller\", \"_index\", \"_name\", \"_text\", \"_priority\", \"_showWindow\", \"_hideOnUse\", \"_shortcut\", \"_visibility\", \"_eventName\"];`<br>- Object - target object to which action is attached<br>- Object - caller object, basically player<br>- Number - index of the action in action menu (0 - top most)<br>- String - engine based action name (\"User\" for user added actions)<br>- String - localized action plain text as seen by the caller<br>- Number - action *priority* value<br>- Boolean - action *showWindow* value<br>- Boolean - action *hideOnUse* value<br>- String - action *shortcut* name or \"\"<br>- Boolean - action menu visibility (on first scroll or action press the menu is still invisible, so no action is performed, only menu is shown)<br>- String - EH event name |\n| **NextAction** | Triggers on mouse wheel scroll down. | `params [\"_target\", \"_caller\", \"_index\", \"_name\", \"_text\", \"_priority\", \"_showWindow\", \"_hideOnUse\", \"_shortcut\", \"_visibility\", \"_eventName\"];`<br>- Object - target object to which action is attached<br>- Object - caller object, basically player<br>- Number - index of the action in action menu (0 - top most)<br>- String - engine based action name (\"User\" for user added actions)<br>- String - localized action plain text as seen by the caller<br>- Number - action *priority* value<br>- Boolean - action *showWindow* value<br>- Boolean - action *hideOnUse* value<br>- String - action *shortcut* name or \"\"<br>- Boolean - action menu visibility (on first scroll or action press the menu is still invisible, so no action is performed, only menu is shown)<br>- String - EH event name |","sections":[{"heading":null,"level":1,"markdown":"In Game UI Event Handlers trigger when user scrolls or activates in game action menu. Additionally a Boolean or Nothing is expected to be returned by the assigned code. If the assigned EH code returns true, default engine action is overridden. For all other available EHs see the main page.\n\n> [!IMPORTANT]\n> Arguments were introduced with Arma 3 v1.50."},{"heading":"Related Commands","level":3,"markdown":"- inGameUISetEventHandler"},{"heading":"Examples","level":3,"markdown":"```sqf\ninGameUISetEventHandler [\"Action\", \"hint 'Lights, Camera, Action!'\"];    // add EH\ninGameUISetEventHandler [\"Action\", \"\"];                                    // remove EH\n```"},{"heading":"Events","level":3,"markdown":"| Class | Description | Arguments - since Arma 3 v1.50 |\n|---|---|---|\n| **PrevAction** | Triggers on mouse wheel scroll up. | `params [\"_target\", \"_caller\", \"_index\", \"_name\", \"_text\", \"_priority\", \"_showWindow\", \"_hideOnUse\", \"_shortcut\", \"_visibility\", \"_eventName\"];`<br>- Object - target object to which action is attached<br>- Object - caller object, basically player<br>- Number - index of the action in action menu (0 - top most)<br>- String - engine based action name (\"User\" for user added actions)<br>- String - localized action plain text as seen by the caller<br>- Number - action *priority* value<br>- Boolean - action *showWindow* value<br>- Boolean - action *hideOnUse* value<br>- String - action *shortcut* name or \"\"<br>- Boolean - action menu visibility (on first scroll or action press the menu is still invisible, so no action is performed, only menu is shown)<br>- String - EH event name |\n| **Action** | Triggers on action key press. | `params [\"_target\", \"_caller\", \"_index\", \"_name\", \"_text\", \"_priority\", \"_showWindow\", \"_hideOnUse\", \"_shortcut\", \"_visibility\", \"_eventName\"];`<br>- Object - target object to which action is attached<br>- Object - caller object, basically player<br>- Number - index of the action in action menu (0 - top most)<br>- String - engine based action name (\"User\" for user added actions)<br>- String - localized action plain text as seen by the caller<br>- Number - action *priority* value<br>- Boolean - action *showWindow* value<br>- Boolean - action *hideOnUse* value<br>- String - action *shortcut* name or \"\"<br>- Boolean - action menu visibility (on first scroll or action press the menu is still invisible, so no action is performed, only menu is shown)<br>- String - EH event name |\n| **NextAction** | Triggers on mouse wheel scroll down. | `params [\"_target\", \"_caller\", \"_index\", \"_name\", \"_text\", \"_priority\", \"_showWindow\", \"_hideOnUse\", \"_shortcut\", \"_visibility\", \"_eventName\"];`<br>- Object - target object to which action is attached<br>- Object - caller object, basically player<br>- Number - index of the action in action menu (0 - top most)<br>- String - engine based action name (\"User\" for user added actions)<br>- String - localized action plain text as seen by the caller<br>- Number - action *priority* value<br>- Boolean - action *showWindow* value<br>- Boolean - action *hideOnUse* value<br>- String - action *shortcut* name or \"\"<br>- Boolean - action menu visibility (on first scroll or action press the menu is still invisible, so no action is performed, only menu is shown)<br>- String - EH event name |"}],"categories":["Introduced with Armed Assault version 1.00"],"groups":["Event Handlers"]}