Skip to main content

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

NameRequiredTypeDescription
object typeYesOne 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 positionYesAny number
y positionYesAny number
z positionYesAny number
map nameNoAny text e.g. "Hello, World!"Default: Untitled
object IDNoAny text e.g. "Hello, World!"Default: automatically generated
schematic nameNoAny 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.