MapLayer
Up and coming: shot check knows this class and its members today, and programs run it once the native runtime lands.
Up and coming
One layer of a top-down map: items you add, scatter or drape.
A MapLayer sits under a MapScene. AddItem adds one item by CFrame, Size, Color and mesh; FillAsync scatters templates over areas with a random yaw and size; DrapeAsync lays a sheet over other layers, raycast onto their bounding boxes and smoothed, in plain Luau.
Made with Instance.new("MapLayer") or Clone().
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| IncludeInHeightMap | boolean | ||
| ItemCount | number | read-only |
Methods
| Name | Arguments | Returns | Description |
|---|---|---|---|
| AddItem | (item: MapItem) | () | Adds one item: a CFrame, Size, Color and mesh, with an optional texture and emissive flag. |
| FillAsync yields | (areas: { { CFrame: CFrame, Size: Vector3 } }, templates: { MapItem }, amount: number?, sizeRange: NumberRange?, seed: number?) | number | Scatters templates over areas: area over footprint times amount (5), random yaw, scale within sizeRange (0.3 to 1.1); returns the count. |
| DrapeAsync yields | (cframe: CFrame, size: Vector2, length: number, studsPerVertex: number, smoothness: number, passes: number, over: { MapLayer }) | (boolean, string?) | Raycasts a sheet onto the other layers' boxes, then smooths it. |
| Shift | (delta: Vector3) | () |
From ShotInstance 33
ClassNameNameParentAncestryChangedAttributeChangedChangedChildAddedChildRemovedDestroyingAddTagClearAllChildrenCloneDestroyFindFirstAncestorFindFirstAncestorOfClassFindFirstAncestorWhichIsAFindFirstChildFindFirstChildOfClassFindFirstChildWhichIsAGetAttributeGetAttributeChangedSignalGetAttributesGetChildrenGetDescendantsGetFullNameGetPropertyChangedSignalGetTagsHasTagIsAIsAncestorOfIsDescendantOfRemoveTagSetAttribute
