Eden Editor Event Handlers – Arma 3
mNo edit summary |
mNo edit summary |
||
Line 39: | Line 39: | ||
[<class>,<from>] | [<class>,<from>] | ||
* class: [[Config]] - connection config class | * class: [[Config]] - connection config class | ||
* from: [[Array | * from: [[Array of Eden Entities]] | ||
|- | |- | ||
| <!-- Title --> | | <!-- Title --> |
Revision as of 17:08, 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 |