# Game 2 Editor (scripting commands)

- [addEditorObject](../../commands/addEditorObject.md): Add an object to the editor and assign arguments. Create script is,called with _new equal to true. Returns the ID of the new EditorObject.,Subtype class is optional.
- [addMenu](../../commands/addMenu.md): Adds a new menu button. Priority is optional.
- [addMenuItem](../../commands/addMenuItem.md): Creates a new menu item. Menu can be "file" or "view",index is index,as returned from addMenu command. priority is optional and determines,where in the menu the item will reside (higher priority items first).
- [allow3DMode](../../commands/allow3DMode.md): Allow/dissallow 3D mode.,
- [allowFileOperations](../../commands/allowFileOperations.md): Allow/dissallow file ops (load/save etc).
- [clearOverlay](../../commands/clearOverlay.md): Clear the current overlay.
- [closeOverlay](../../commands/closeOverlay.md): Closes the current overlay without committing.
- [collapseObjectTree](../../commands/collapseObjectTree.md): Collapse the object tree.
- [commitOverlay](../../commands/commitOverlay.md): Commit the current overlay.
- [createMenu](../../commands/createMenu.md): Creates a previously added menu.
- [deleteEditorObject](../../commands/deleteEditorObject.md): Delete the editor object. Requires all editor object links to be removed prior.
- [drawLink](../../commands/drawLink.md): The editor will draw a line between the two specified editor objects. Line type can be LINE or ARROW.
- [editObject](../../commands/editObject.md): Show the edit object dialog for the given object.
- [editorSetEventHandler](../../commands/editorSetEventHandler.md): Sets given event handler of given editor.
- [evalObjectArgument](../../commands/evalObjectArgument.md): Return argument in mission editor of a given object.
- [execEditorScript](../../commands/execEditorScript.md): Execute an editor script for the specified object.
- [findEditorObject](../../commands/findEditorObject.md): Return object that matches the provided reference.
- [fromEditor](../../commands/fromEditor.md): Return if given team was inserted directly from mission editor.
- [getEditorCamera](../../commands/getEditorCamera.md): Fetches a reference to the mission editor camera.
- [getEditorMode](../../commands/getEditorMode.md): Returns the current mode of the editor.
- [getEditorObjectScope](../../commands/getEditorObjectScope.md): Returns the editor object scope of the specified editor object.
- [getObjectArgument](../../commands/getObjectArgument.md): Return name of object argument in mission editor.
- [getObjectChildren](../../commands/getObjectChildren.md): Return a list of all the children of the specified object.
- [getObjectProxy](../../commands/getObjectProxy.md): Return the proxy object associated with the given editor object.
- [importAllGroups](../../commands/importAllGroups.md): Imports all groups into the RTE.
- [insertEditorObject](../../commands/insertEditorObject.md): Insert an object to the editor and assign arguments. Create script is,not called. Returns the ID of the new EditorObject. Subtype class is,optional.
- [isRealTime](../../commands/isRealTime.md): Returns true if the mission editor is operating in real time mode.
- [isShowing3DIcons](../../commands/isShowing3DIcons.md): Returns true if the editor is set to draw 3D icons.
- [listObjects](../../commands/listObjects.md): Return the list of all objects of given type.
- [loadOverlay](../../commands/loadOverlay.md): Creates the load overlay dialog for the specified type of overlay.
- [lookAtPos](../../commands/lookAtPos.md): Point the camera and center the map on the position.
- [moveObjectToEnd](../../commands/moveObjectToEnd.md): Shifts an editor object to the end of the objects array. This means,that the object will be drawn last (after all other objects).
- [newOverlay](../../commands/newOverlay.md): Creates the new overlay dialog for the specified type of overlay.
- [nextMenuItemIndex](../../commands/nextMenuItemIndex.md): Returns the next available menu item index.
- [nMenuItems](../../commands/nMenuItems.md): Returns the total number of user-added menu items belonging to the given menu.
- [onDoubleClick](../../commands/onDoubleClick.md): Defines an action performed when the user double clicks on the map. Command receives:,_pos array position,_units array selected units,_shift,_alt bool key state
- [onShowNewObject](../../commands/onShowNewObject.md): Defines an action performed when the user right clicks on the map and,selects New Object. Set to empty for default behavior. Command receives:,_pos array position,
- [removeDrawIcon](../../commands/removeDrawIcon.md): Removes an icon for an editor object.
- [removeDrawLinks](../../commands/removeDrawLinks.md): Remove all drawn links for the given editor object for the given editor,object type. Pass an empty string as param type to remove all draw,links for an object.
- [removeMenuItem](../../commands/removeMenuItem.md): Removes a previously added menu item.
- [restartEditorCamera](../../commands/restartEditorCamera.md): Restarts the mission editor camera (if it was deleted by a script,for example).
- [saveOverlay](../../commands/saveOverlay.md): Save the current overlay.
- [selectedEditorObjects](../../commands/selectedEditorObjects.md): Returns a list of currently selected editor objects.
- [selectEditorObject](../../commands/selectEditorObject.md): Select an editor object. Does not un-select previously selected objects.
- [setDrawIcon](../../commands/setDrawIcon.md): Set the icon to be shown in 2D editor for the specified editor object. If maintain size is false,icon will not scale depending on the scale,of the map.
- [setEditorMode](../../commands/setEditorMode.md): Sets map mode to MAP,3D or PREVIEW.
- [setEditorObjectScope](../../commands/setEditorObjectScope.md): This command defines the level of access a user has to editor objects.
- [setFromEditor](../../commands/setFromEditor.md): Set if given team member was inserted directly from editor.
- [setObjectArguments](../../commands/setObjectArguments.md): Set object arguments in mission editor.
- [setObjectProxy](../../commands/setObjectProxy.md): Set the proxy object associated with the given editor object.
- [setVisibleIfTreeCollapsed](../../commands/setVisibleIfTreeCollapsed.md): Sets whether or not the object is visible even if the tree is collapsed.
- [show3DIcons](../../commands/show3DIcons.md): Toggle the drawing of 3D icons.
- [showLegend](../../commands/showLegend.md): Show/hide map legend.
- [showNewEditorObject](../../commands/showNewEditorObject.md): Show the add editor object dialog,type is editor object type,class is,class definition to automatically select,side filters by a certain,side,pos is position to create the object.
- [updateDrawIcon](../../commands/updateDrawIcon.md): Updates the icon to be shown in 2D editor for the specified editor,object. If maintain size is false,icon will not scale depending on the,scale of the map.
- [updateMenuItem](../../commands/updateMenuItem.md): Sets the text and command for the menu item. Index is index returned by addMenuItem command. Command is optional.
- [updateObjectTree](../../commands/updateObjectTree.md): Update the editor object tree.
