Eden Editor Event Handlers – Arma 3
mNo edit summary |
mNo edit summary |
||
Line 26: | Line 26: | ||
== List == | == List == | ||
Most handlers don't receive any arguments. That is intended, because in most cases, required data can be obtained either using [[get3DENActionState]], or by specialized 'get' commands. | |||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
! Class | ! Class | ||
Line 98: | Line 98: | ||
==== OnMapClosed ==== | ==== OnMapClosed ==== | ||
| <!-- Description --> | | <!-- Description --> | ||
When map is closed. | |||
| <!-- Arguments --> | | <!-- Arguments --> | ||
''None'' | ''None'' | ||
Line 104: | Line 105: | ||
==== OnMapOpened ==== | ==== OnMapOpened ==== | ||
| <!-- Description --> | | <!-- Description --> | ||
When map is opened. | |||
| <!-- Arguments --> | | <!-- Arguments --> | ||
''None'' | ''None'' | ||
Line 110: | Line 112: | ||
==== OnMessage ==== | ==== OnMessage ==== | ||
| <!-- Description --> | | <!-- Description --> | ||
Handler used for showing on-screen notifications, triggered by various range of events. | |||
Message IDs: | Message IDs: | ||
*0 - Mission saved | *0 - Mission saved | ||
Line 175: | Line 178: | ||
==== OnModeChange ==== | ==== OnModeChange ==== | ||
| <!-- Description --> | | <!-- Description --> | ||
When | When ''Save As'' action is triggered (i.e., Save window is opened, but the mission is not necessarily saved yet). | ||
| <!-- Arguments --> | | <!-- Arguments --> | ||
''None'' | ''None'' | ||
Line 182: | Line 185: | ||
==== OnMoveGridToggle ==== | ==== OnMoveGridToggle ==== | ||
| <!-- Description --> | | <!-- Description --> | ||
When '''translation''' grid is toggled on or off | When '''translation''' grid is toggled on or off. | ||
| <!-- Arguments --> | | <!-- Arguments --> | ||
''None'' | ''None'' | ||
Line 189: | Line 192: | ||
==== OnPaste ==== | ==== OnPaste ==== | ||
| <!-- Description --> | | <!-- Description --> | ||
When entities are pasted | When entities are pasted. | ||
| <!-- Arguments --> | | <!-- Arguments --> | ||
''None'' | ''None'' | ||
Line 196: | Line 199: | ||
==== OnPasteUnitOrig ==== | ==== OnPasteUnitOrig ==== | ||
| <!-- Description --> | | <!-- Description --> | ||
When entities are pasted on their original positions | When entities are pasted on their original positions. | ||
| <!-- Arguments --> | | <!-- Arguments --> | ||
''None'' | ''None'' | ||
Line 203: | Line 206: | ||
==== OnRedo ==== | ==== OnRedo ==== | ||
| <!-- Description --> | | <!-- Description --> | ||
When undo operation is redone | When undo operation is redone. | ||
| <!-- Arguments --> | | <!-- Arguments --> | ||
''None'' | ''None'' | ||
Line 210: | Line 213: | ||
==== OnRotateGridToggle ==== | ==== OnRotateGridToggle ==== | ||
| <!-- Description --> | | <!-- Description --> | ||
When '''rotation''' grid is toggled on or off | When '''rotation''' grid is toggled on or off. | ||
| <!-- Arguments --> | | <!-- Arguments --> | ||
''None'' | ''None'' | ||
Line 217: | Line 220: | ||
==== OnScaleGridToggle ==== | ==== OnScaleGridToggle ==== | ||
| <!-- Description --> | | <!-- Description --> | ||
When '''area scaling''' grid is toggled on or off | When '''area scaling''' grid is toggled on or off. | ||
| <!-- Arguments --> | | <!-- Arguments --> | ||
''None'' | ''None'' | ||
Line 224: | Line 227: | ||
==== OnSearchCreate ==== | ==== OnSearchCreate ==== | ||
| <!-- Description --> | | <!-- Description --> | ||
When "SearchCreate" action is triggered (e.g., when pressing Ctrl+Shift+F) | When "SearchCreate" action is triggered (e.g., when pressing Ctrl+Shift+F). | ||
| <!-- Arguments --> | | <!-- Arguments --> | ||
''None'' | ''None'' | ||
Line 231: | Line 234: | ||
==== OnSearchEdit ==== | ==== OnSearchEdit ==== | ||
| <!-- Description --> | | <!-- Description --> | ||
When "SearchEdit" action is triggered (e.g., when pressing Ctrl+F) | When "SearchEdit" action is triggered (e.g., when pressing Ctrl+F). | ||
| <!-- Arguments --> | | <!-- Arguments --> | ||
''None'' | ''None'' |
Revision as of 16:26, 2 November 2015
Eden Editor event handlers. When added, they will remain until Eden Editor is closed. Playing preview will not erase them.
Scripting
Commands:
Example:
add3DENEventHandler ["onUndo",{hint "Undo";}]
Config
Alternatively, you can define event handlers directly in the config. Use your custom section (mySection in the example) to prevent overriding handlers from other sources. Handlers defined here will be added automatically when Eden Editor is opened.
class Cfg3DEN { class EventHandlers { class mySection { onUndo = "hint 'Undo';"; // <handlerName> = <handlerExpression> }; }; };
List
Most handlers don't receive any arguments. That is intended, because in most cases, required data can be obtained either using get3DENActionState, or by specialized 'get' commands.
Class | Description | Arguments |
---|---|---|
OnConnectingStart |
When Connecting operation is initiated. |
[<class>,<from>]
|
OnConnectingEnd |
When Connecting operation is terminated, no matter if it was confirmed or canceled. |
[<class>,<from>,<to>]
|
OnCopy |
When entities are copied. |
None |
OnCut |
When entities are cut. |
None |
OnDeleteUnits |
When entities are deleted. |
None |
OnEntityMenu |
When Entity Context Menu is opened. |
[position, entity, listPath]
|
OnGridChange |
When grid changes, either using Toolbar option, ot by scripting command set3DENGrid. |
[gridType, gridValue] |
OnMapClosed |
When map is closed. |
None |
OnMapOpened |
When map is opened. |
None |
OnMessage |
Handler used for showing on-screen notifications, triggered by various range of events. Message IDs:
|
[messageID]
|
OnMissionLoad |
When a scenario is loaded. |
None |
OnMissionNew |
When new scenario is started. Executed also when Eden is opened with an empty scenario. |
None |
OnMissionPreview |
When scenario preview is started. Executed when the scenario is already loaded, so entities in it can be accessed. |
[objects, groups, waypoints, markers]
Each array is in format: [entity1, id1, entity2, id2, ..., entityN, idN] |
OnMissionPreviewEnd |
When preview ends and user returns back to Eden Editor. |
None |
OnMissionSave |
When a scenario is saved. |
None |
OnMissionSaveAs |
None | |
OnModeChange |
When Save As action is triggered (i.e., Save window is opened, but the mission is not necessarily saved yet). |
None |
OnMoveGridToggle |
When translation grid is toggled on or off. |
None |
OnPaste |
When entities are pasted. |
None |
OnPasteUnitOrig |
When entities are pasted on their original positions. |
None |
OnRedo |
When undo operation is redone. |
None |
OnRotateGridToggle |
When rotation grid is toggled on or off. |
None |
OnScaleGridToggle |
When area scaling grid is toggled on or off. |
None |
OnSearchCreate |
When "SearchCreate" action is triggered (e.g., when pressing Ctrl+Shift+F). |
None |
OnSearchEdit |
When "SearchEdit" action is triggered (e.g., when pressing Ctrl+F). |
None |
OnServerToggle |
When server is created or destroyed fro the preview. |
None |
OnSubmodeChange |
When submode (e.g., BLUFOR or OFPOR for Objects, or Modules for Systems) changes. |
None |
OnSurfaceSnapToggle |
When surface snap settings are changed. |
None |
OnTerrainNew |
When new terrain is loaded. Executed also when Eden is opened. |
None |
OnToggleMapTextures |
When map textures are toggled on or off. |
None |
OnUndo |
When an operation is undone. |
None |
OnVerticalToggle |
When vertical mode settings are changed. |
None |
OnWidgetNone |
When no widget is selected. |
None |
OnWidgetRotation |
When rotation widget is selected. |
None |
OnWidgetScale |
When area scaling widget is selected. |
None |
OnWidgetToggle |
When widget is toggled (i.e., browsing through all widget types) |
None |
OnWidgetTranslation |
When translation widget is selected. |
None |
OnWorkspacePartSwitch |
When scenario phase is selected. |
None |