Skip to content

Change Picture

Change Picture

Adjusts the properties of a currently displayed picture over a duration.

Properties

System

Name Explanation Type
Color Mask The color mask to apply to the picture. Color
Color Mask Enabled Whether color mask adjustment is enabled. Toggle
Duration (milliseconds) The duration to adjust the picture over in milliseconds. Variable or Value
Height The height to stretch the picture to. Variable or Value
Height Enabled Whether height adjustment is enabled. Toggle
Hue Shift The hue shift to apply to the picture. Variable or Value
Hue Shift Enabled Whether hue shift adjustment is enabled. Toggle
ID The ID of the picture to use. Variable or Value
Opacity The opacity to apply to the picture. Variable or Value
Opacity Enabled Whether opacity adjustment is enabled. Toggle
Rotation (Degrees) The rotation to apply to the picture, in degrees. Variable or Value
Rotation Enabled Whether rotation adjustment is enabled. Toggle
Run Asynchronously Whether the operation runs asynchronously. Toggle
Scale X The X scaling to apply to the picture. Variable or Value
Scale X Enabled Whether X scaling adjustment is enabled. Toggle
Scale Y The Y scaling to apply to the picture. Variable or Value
Scale Y Enabled Whether Y scaling adjustment is enabled. Toggle
Use As Delta Values Whether to adjust the picture by this amount, rather than to the set value. Toggle
Width The width to stretch the picture to. Variable or Value
Width Enabled Whether width adjustment is enabled. Toggle
X The X position to apply to the picture. Variable or Value
X Enabled Whether X position adjustment is enabled. Toggle
Y The Y position to apply to the picture. Variable or Value
Y Enabled Whether Y position adjustment is enabled. Toggle
Z-Index The Z-index to apply to the picture. Variable or Value
Z-Index Enabled Whether Z-index adjustment is enabled. Toggle

Examples

Move a Picture to a New Position Over One Second

This moves picture ID stored in global variable 0 to position (200, 100) over 1000 milliseconds using delta values.

change_picture($gv[0], duration: 1000, x: 200, y: 100);
{"Data":{"AdjustmentDuration":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1000","VariableIndex":0,"Metadata":null},"ColorMask":{"Red":1,"Green":1,"Blue":1,"Alpha":1},"Height":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"HueShift":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"ID":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"","VariableIndex":0,"Metadata":null},"IsAsynchronousOperation":false,"IsColorMaskEnabled":false,"IsDeltaOperation":true,"IsHeightEnabled":false,"IsHueShiftEnabled":false,"IsOpacityEnabled":false,"IsRotationEnabled":false,"IsScaleXEnabled":false,"IsScaleYEnabled":false,"IsWidthEnabled":false,"IsXEnabled":true,"IsYEnabled":true,"IsZIndexEnabled":false,"Opacity":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"Rotation":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"ScaleX":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"ScaleY":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"Width":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"X":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"200","VariableIndex":0,"Metadata":null},"Y":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"100","VariableIndex":0,"Metadata":null},"ZIndex":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Picture.ChangePictureCommand"}

Fade a Picture to Zero Opacity with Set Mode

This fades picture ID stored in global variable 0 to 0 opacity over 500 milliseconds using set mode (absolute values instead of delta).

change_picture($gv[0], duration: 500, set, opacity: 0);
{"Data":{"AdjustmentDuration":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"500","VariableIndex":0,"Metadata":null},"ColorMask":{"Red":1,"Green":1,"Blue":1,"Alpha":1},"Height":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"HueShift":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"ID":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"","VariableIndex":0,"Metadata":null},"IsAsynchronousOperation":false,"IsColorMaskEnabled":false,"IsDeltaOperation":false,"IsHeightEnabled":false,"IsHueShiftEnabled":false,"IsOpacityEnabled":true,"IsRotationEnabled":false,"IsScaleXEnabled":false,"IsScaleYEnabled":false,"IsWidthEnabled":false,"IsXEnabled":false,"IsYEnabled":false,"IsZIndexEnabled":false,"Opacity":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"Rotation":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"ScaleX":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"ScaleY":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"Width":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"X":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"Y":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"ZIndex":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Picture.ChangePictureCommand"}

Asynchronously Rotate a Picture

This rotates picture ID 1 by 45 degrees over 500 milliseconds without blocking the script.

change_picture(1, duration: 500, async, rotation: 45);
{"Data":{"AdjustmentDuration":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"500","VariableIndex":0,"Metadata":null},"ColorMask":{"Red":1,"Green":1,"Blue":1,"Alpha":1},"Height":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"HueShift":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"ID":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"IsAsynchronousOperation":true,"IsColorMaskEnabled":false,"IsDeltaOperation":true,"IsHeightEnabled":false,"IsHueShiftEnabled":false,"IsOpacityEnabled":false,"IsRotationEnabled":true,"IsScaleXEnabled":false,"IsScaleYEnabled":false,"IsWidthEnabled":false,"IsXEnabled":false,"IsYEnabled":false,"IsZIndexEnabled":false,"Opacity":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"Rotation":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"45","VariableIndex":0,"Metadata":null},"ScaleX":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"ScaleY":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"Width":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"X":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"Y":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"ZIndex":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Picture.ChangePictureCommand"}