MER.CreateObject
Optional integration
This method requires ProjectMapEditorReborn.
Creates a MER map object.
Syntax
MER.CreateObject object_type x_position y_position z_position "map_name"? "object_ID"? "schematic_name"?
Returns
reference to MERObjectDefinition object
Arguments
| Name | Required | Type | Description |
|---|---|---|---|
object type | Yes | One of the following options: > schematic > primitive > light > door > workstation > itemSpawnpoint > playerSpawnpoint > capybara > text > scp079Camera > shootingTarget > locker > teleport > interactable > waypoint | Options: schematic, primitive, light, door, workstation, itemSpawnpoint, playerSpawnpoint, capybara, text, scp079Camera, shootingTarget, locker, teleport, interactable, waypoint |
x position | Yes | Any number | |
y position | Yes | Any number | |
z position | Yes | Any number | |
map name | No | Any text e.g. "Hello, World!" | Default: Untitled |
object ID | No | Any text e.g. "Hello, World!" | Default: automatically generated |
schematic name | No | Any text e.g. "Hello, World!" | Used only when object type is schematic. |
Details
The position is absolute. Definition properties are forwarded and refreshed after writes.
Possible errors
- The object type or schematic name is invalid.
- The object ID already exists.
- ProjectMER failed to spawn the object.
On a running server
Use serhelp MER.CreateObject to inspect the reference generated by your installed SER version.