Skip to content

Adjust Map Layer

Adjust Map Layer

Modifies the visual properties of a map layer, such as its color mask and opacity.

Properties

System

Name Explanation Type
Color Mask The color mask to apply to the layer. Color
Map Layer The map layer to adjust. Use 0 for the base layer, positive numbers for upper layers, and negative numbers for lower layers. Variable or Value
Opacity The opacity of the layer, from 0 (fully transparent) to 1 (fully opaque). Variable or Value
Use Color Mask Whether to apply the color mask to the layer. Toggle
Use Opacity Whether to apply the opacity value to the layer. Toggle

Examples

Apply a Red Color Mask to Layer 1

This applies a red color mask to the first upper map layer (parallax layers only).

adjust_map_layer(1, color: #FF0000);
{"Data":{"ColorMask":{"R":255,"G":0,"B":0,"A":255},"MapLayer":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"Opacity":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"UseColorMask":true,"UseOpacity":false,"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Map.MapLayerAdjustmentCommand"}

Set Layer Opacity to 50 Percent Using a Variable

This sets the opacity of the map layer specified by Global Variable 0 to 0.5 (50%).

adjust_map_layer($gv[0], opacity: 0.5);
{"Data":{"ColorMask":{"R":255,"G":255,"B":255,"A":255},"MapLayer":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"","VariableIndex":0,"Metadata":null},"Opacity":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0.5","VariableIndex":0,"Metadata":null},"UseColorMask":false,"UseOpacity":true,"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Map.MapLayerAdjustmentCommand"}