WDL Map Editor
You can enable the Map Editor using the Lua console (F3) in the Toolbar, or by specifying a Key bind in the Startup menu.
- CTRL + T: Gizmo Position
- CTRL + R: Gizmo Rotation
- CTRL + S: Gizmo Scale (only available for Trigger entity right now!)
- CTRL + D: Duplicate Entity
This view lists all available elements for spawning. You can toggle between a List / "Preview" view. The folder structure on the left can be used to navigate different categories.
Holds a list of all spawned entities by the Map Editor. If no name is given to an object, then it's Asset name is used. You can configure custom names in the Properties window. You can also Right-Click an Entity to either Delete it from the map, or duplicate it.
Shows a list of all properties to the selected entity. Additionally, you can use the "Gizmo" tab to configure the Gizmo to enable snapping to Grid.
Settings about your newly created map. This is the place to save your creations to a shareable JSON file. You can use the button "Copy to clipboard" to find your JSON files.
- Autosave Interval: Interval in which the map saves automatically. You can load your last autosave using the Menubar.
- Enable Object Physics by default: When placing new objects, their physics is either enabled or disabled. If set to enabled, then the physics will only enable after you finish placing your object.
- AABB (Bounding Boxes): Renders a box outline for every spawned object
- Name: Display object name (or asset name) over spawned objects
- Draw Distance: Maximum distance in which to draw AABB + Name
- Enabled: Toggle visibility of a Grid
- Size: Grid size in units (note: Grid origin is at 0,0,0)
- Alpha: Grid transparency
- Z: Z-position (height) of the Grid
The following Lua functions are available:
- ScriptHook.IsMapEditorEnabled, ScriptHook.SetMapEditorEnabled
- ScriptHook.LoadMap, ScriptHook.ResetMap
- ScriptHook.GetMapEntityById, ScriptHook.GetMapEntityByName, ScriptHook.GetMapEntitiesByName