Eden Editor Event Handlers – Arma 3

From Bohemia Interactive Community
Revision as of 14:30, 2 November 2015 by Str (talk | contribs)
Jump to navigation Jump to search

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

Class Description Arguments

OnConnectingStart

[<class>,<from>]
  • class: Config - connection config class
  • from: Array of Eden entities

OnConnectingEnd

[<class>,<from>,<to>]
  • class: Config - connection config class
  • from: Array of 3DEN entities
  • to: 3DEN Entity (when connecting was successful) or nil (when connecting was terminated)

This handler is called every time connecting mode ends, even when user cancelled it

OnCopy

None

OnCut

None

OnDeleteUnits

None

OnGridChange

[gridType, gridValue]
  • gridType: String - can be "translation", "rotation" or "scaling"
  • gridValue: Number

OnMapClosed

None

OnMapOpened

None

OnMessage

Message IDs:

  • 0 - Mission saved
  • 1 - Mission autosaved
  • 2 - Trying to move a character into full vehicle
  • 3 - Moved character into enemy vehicle
  • 4 - Trying to run mission without any player
  • 5 - Mission exported to SP
  • 6 - Mission exported to MP
  • 7 - Attempting to delete a default layer
[messageID]

OnMissionLoad

None

OnMissionNew

None

OnMissionPreview

[objects, groups, waypoints, markers]
  • objects: Array
  • groups: Array
  • waypoints: Array
  • markers: Array

Each array is in format:

[entity1, id1, entity2, id2, ..., entityN, idN]

OnMissionPreviewEnd

None

OnMissionSave

None

OnMissionSaveAs

None

OnModeChange

None

OnMoveGridDecrease

None

OnMoveGridIncrease

None

OnMoveGridToggle

None

OnPaste

None

OnPasteUnitOrig

None

OnRedo

None

OnRotateGridDecrease

None

OnRotateGridIncrease

None

OnRotateGridToggle

None

OnScaleGridToggle

None

OnSearchCreate

None

OnSearchEdit

None

OnServerToggle

None

OnSubmodeChange

None

OnSurfaceSnapToggle

None

OnTerrainNew

None

OnToggleMapIDs

None

OnToggleMapTextures

None

OnUndo

None

OnVerticalToggle

None

OnWidgetNone

None

OnWidgetRotation

None

OnWidgetScale

None

OnWidgetToggle

None

OnWidgetTranslation

None

OnWorkspacePartSwitch

None