LevelEdit
Hides or moves a brush or level entity for all players in a dimension. A brush is found by its mesh and the level's position for it, within 5 cm, and an entity by its EntityGuid. Edits are held in memory only, so a server restart ends them. Applying to the same object again changes the existing edit.
levelEdit.apply()
LevelEdit.apply(definition, dimension)Applies an edit and returns it.
levelEdit.all()
LevelEdit.all(dimension)All active edits, or those in one dimension.
levelEdit.getById()
LevelEdit.getById(id)The edit with this id, or null.
levelEdit.restoreAll()
LevelEdit.restoreAll(dimension)Removes all edits, or those in one dimension, restoring the objects as the level had them.
levelEdit.state
stateA snapshot of the edit, or null once restored.
levelEdit.exists
existsFalse once the edit has been restored.
levelEdit.kind
kind'brush' or 'entity'.
levelEdit.name
nameA brush's mesh path, or an entity's name.
levelEdit.guid
guidAn entity's GUID, or '' for a brush.
levelEdit.dimension
dimensionThe dimension it applies in.
levelEdit.hidden
hiddenWhether the object is hidden. You can assign to it.
levelEdit.moved
movedWhether the object has been moved.
levelEdit.model
modelThe mesh standing in the object's place, or ''. Assigning a props catalogue mesh, by path or file name, replaces the object for all players with a static Prop owned by the editing resource, at the object's position or the moved one, with the definition's rotation. Assigning '' brings the object back, and restoring the edit removes the replacement. Throws a TypeError for a mesh not in the catalogue. A brush whose collision the game keeps in static physics without a node keeps that collision while out, which applies for now to most of a village's houses and props.
levelEdit.move()
move(position, rotation, scale)Moves the object, and can also turn and resize it.
levelEdit.clearMove()
clearMove()Returns the object to where the level placed it.
levelEdit.restore()
restore()Ends the edit, so all players get the level's object back.
levelEdit.id
id: numberThe edit's id.