Skip to content

Play Video

Play Video

Plays a video file on screen with configurable position, size, and visual effects.

Properties

System

Name Explanation Type
Color Mask The color mask to apply to the video. Color
Fullscreen Whether the video plays at fullscreen. Switch or Value
Height The height to apply to the video. Variable or Value
Hue Shift The hue shift to apply to the video. Variable or Value
ID The ID of the video to use. Variable or Value
Loop Whether the video loops continuously. Switch or Value
Opacity The opacity to apply to the video. Variable or Value
Rotation (Degrees) The rotation to apply to the video, in degrees. Variable or Value
Use Relative Positioning Whether the video uses relative coordinates scaled to the screen resolution. Toggle
Video The video file to play. Video
Volume The volume to apply to the video. Variable or Value
Width The width to apply to the video. Variable or Value
X The X position to apply to the video. Variable or Value
Y The Y position to apply to the video. Variable or Value
Z-Index The Z-index to apply to the video. Variable or Value

Examples

Play a Fullscreen Video

Plays a video file at fullscreen using video ID 0.

play_video(0, "Content/Videos/Intro.ogg");
{"Data":{"ID":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"VideoFile":"Content/Videos/Intro.ogg","ColorMask":"#FFFFFFFF","Height":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"HueShift":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"IsFullscreen":{"IsGlobalSwitch":false,"IsLocalSwitch":false,"IsValue":true,"Value":true,"SwitchIndex":0},"IsLooping":{"IsGlobalSwitch":false,"IsLocalSwitch":false,"IsValue":true,"Value":false,"SwitchIndex":0},"IsRelativeCoordinates":true,"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},"Volume":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"Width":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"X":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"Y":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","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.Video.PlayVideoCommand"}

Play a Windowed Video with Custom Position and Size

Plays a video in a window at a specific position and size using absolute coordinates.

play_video($gv[0], "Content/Videos/Cutscene.ogg", fullscreen: false, x: 100, y: 50, width: 640, height: 480);
{"Data":{"ID":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"","VariableIndex":0,"Metadata":null},"VideoFile":"Content/Videos/Cutscene.ogg","ColorMask":"#FFFFFFFF","Height":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"480","VariableIndex":0,"Metadata":null},"HueShift":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"IsFullscreen":{"IsGlobalSwitch":false,"IsLocalSwitch":false,"IsValue":true,"Value":false,"SwitchIndex":0},"IsLooping":{"IsGlobalSwitch":false,"IsLocalSwitch":false,"IsValue":true,"Value":false,"SwitchIndex":0},"IsRelativeCoordinates":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},"Volume":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"Width":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"640","VariableIndex":0,"Metadata":null},"X":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"100","VariableIndex":0,"Metadata":null},"Y":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"50","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.Video.PlayVideoCommand"}

Play a Looping Video with Reduced Volume

Plays a looping video at half volume using relative coordinates.

play_video(0, "Content/Videos/Background.ogg", loop: true, relative_coordinates, volume: 0.5);
{"Data":{"ID":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"VideoFile":"Content/Videos/Background.ogg","ColorMask":"#FFFFFFFF","Height":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"HueShift":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"IsFullscreen":{"IsGlobalSwitch":false,"IsLocalSwitch":false,"IsValue":true,"Value":true,"SwitchIndex":0},"IsLooping":{"IsGlobalSwitch":false,"IsLocalSwitch":false,"IsValue":true,"Value":true,"SwitchIndex":0},"IsRelativeCoordinates":true,"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},"Volume":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0.5","VariableIndex":0,"Metadata":null},"Width":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"X":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"Y":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","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.Video.PlayVideoCommand"}