Hatch Game Engine Documentation v1.4.0
The documentation for the Hatch Game Engine
Loading...
Searching...
No Matches
Scene Class Reference

Functions for manipulating and retrieving information about scenes. More...

Public Member Functions

void Load (string filename, boolean persistency)
 Changes the active scene. The active scene is changed to the one in the specified resource file.
void Load (boolean persistency)
 Changes the active scene. The active scene is changed to the currently set entry in the scene list, if it exists (see SceneList.).
void Change (string scene)
 Changes the current scene.
void Change (string category, string scene)
 Changes the current scene.
void LoadTileCollisions (string filename, integer tilesetID)
 Load tile collisions from a resource file.
boolean AreTileCollisionsLoaded ()
 Returns or whether tile collisions are loaded.
boolean AddTileset (string tileset)
 Adds a new tileset into the scene.
void Restart ()
 Restarts the active scene.
boolean PropertyExists (string property)
 Checks if a property exists.
value GetProperty (string property)
 Gets a property.
integer GetLayerCount ()
 Gets the amount of layers in the active scene.
integer GetLayerIndex (string layerName)
 Gets the layer index of the layer with the specified name.
string GetLayerName (integer layerIndex)
 Gets the name of the specified layer.
boolean GetLayerVisible (integer layerIndex)
 Gets the visibility of the specified layer.
decimal GetLayerOpacity (integer layerIndex)
 Gets the opacity of the specified layer.
Shader GetLayerShader (integer layerIndex)
 Gets the shader of the specified layer.
boolean GetLayerUsePaletteIndexLines (integer layerIndex)
 Gets whether the layer is using the global palette index table.
value GetLayerProperty (integer layerIndex, string property)
 Gets a property of the specified layer.
boolean GetLayerExists (integer layerIndex)
 Gets whether a layer exists.
integer GetLayerDeformSplitLine (integer layerIndex)
 Gets the Deform Split Line of the specified layer.
integer GetLayerDeformOffsetA (integer layerIndex)
 Gets the tile deform offset above the Deform Split Line of the specified layer.
integer GetLayerDeformOffsetB (integer layerIndex)
 Gets the tile deform offset below the Deform Split Line of the specified layer.
boolean LayerPropertyExists (integer layerIndex, string property)
 Checks if a property exists in the specified layer.
string GetName ()
 Gets the name of the active scene.
SCENETYPE GetType ()
 Gets the type of the active scene.
integer GetWidth ()
 Gets the width of the scene (in tiles).
integer GetHeight ()
 Gets the height of the scene (in tiles).
integer GetLayerWidth (integer layerIndex)
 Gets the width of a layer index (in tiles).
integer GetLayerHeight (integer layerIndex)
 Gets the height of a layer index (in tiles).
decimal GetLayerOffsetX (integer layerIndex)
 Gets the X offset of a layer index.
decimal GetLayerOffsetY (integer layerIndex)
 Gets the Y offset of a layer index.
integer GetLayerDrawGroup (integer layerIndex)
 Gets the draw group of the specified layer.
boolean GetLayerHorizontalRepeat (integer layerIndex)
 Gets whether the layer repeats horizontally.
boolean GetLayerVerticalRepeat (integer layerIndex)
 Gets whether the layer repeats vertically.
integer GetTilesetCount ()
 Gets the amount of tilesets in the current scene.
integer GetTilesetIndex (integer tilesetID)
 Gets the tileset index for the specified filename.
string GetTilesetName (Index tilesetIndex)
 Gets the tileset name for the specified tileset index.
integer GetTilesetTileCount (integer tilesetID)
 Gets the tile count for the specified tileset.
integer GetTilesetFirstTileID (integer tilesetID)
 Gets the first tile index number for the specified tileset.
integer GetTilesetPaletteIndex (integer tilesetID)
 Gets the palette index for the specified tileset.
integer GetTileWidth ()
 Gets the width of tiles.
integer GetTileHeight ()
 Gets the height of tiles.
integer GetTileID (integer layer, number x, number y)
 Gets the tile's index number at the tile coordinates.
boolean GetTileFlipX (integer layer, number x, number y)
 Gets whether the tile at the tile coordinates is flipped horizontally.
boolean GetTileFlipY (integer layer, number x, number y)
 Gets whether the tile at the tile coordinates is flipped vertically.
integer GetDrawGroupCount ()
 Gets the amount of draw groups in the active scene.
boolean GetDrawGroupEntityDepthSorting (integer drawGroup)
 Gets if the specified draw group sorts objects by depth.
string GetCurrentFolder ()
 Gets the current folder of the scene.
string GetCurrentID ()
 Gets the current ID of the scene.
string GetCurrentResourceFolder ()
 Gets the current resource folder of the scene.
string GetCurrentCategory ()
 Gets the current category name of the scene.
integer GetDebugMode ()
 Gets whether Debug Mode has been turned on in the current scene.
Entity GetFirstInstance ()
 Gets the first active instance in the scene.
Entity GetLastInstance ()
 Gets the last active instance in the scene.
integer GetReservedSlotIDs ()
 Gets the number of reserved slot IDs to account for before creating instances.
integer GetInstanceCount ()
 Gets the count of instances currently in the scene.
integer GetStaticInstanceCount ()
 Gets the count of instances currently in the scene.
integer GetDynamicInstanceCount ()
 Gets the count of instances currently in the scene.
integer GetTileAnimationEnabled ()
 Gets whether tile animation is enabled.
array GetTileAnimSequence (integer tileID)
 Gets the tile IDs of the animation sequence for a tile ID.
array GetTileAnimSequenceDurations (integer tileID)
 Gets the frame durations of the animation sequence for a tile ID.
boolean GetTileAnimSequencePaused (integer tileID)
 Returns whether a tile ID animation sequence is paused.
decimal GetTileAnimSequenceSpeed (integer tileID)
 Gets the speed of a tile ID animation sequence.
integer GetTileAnimSequenceFrame (integer tileID)
 Gets the current frame of a tile ID animation sequence.
boolean IsCurrentEntryValid ()
 Checks if the current entry in the scene list is valid.
boolean IsUsingFolder (string folder)
 Checks whether the current scene's folder matches the string to check.
boolean IsUsingID (string id)
 Checks whether the current scene's ID matches the string to check.
boolean IsPaused ()
 Gets whether the scene is paused.
void SetReservedSlotIDs (integer amount)
 Sets the number of reserved slot IDs to account for before creating instances.
void SetDebugMode ()
 Sets whether Debug Mode has been turned on in the current scene.
void SetTile (integer layer, number cellX, number cellY, integer tileID, boolean flipX, boolean flipY, integer collisionMaskA, integer collisionMaskB)
 Sets the tile at a position.
void SetTileCollisionSides (integer layer, number cellX, number cellY, integer collisionMaskA, integer collisionMaskB)
 Sets the collision of a tile at a position.
void SetPaused (boolean isPaused)
 Sets whether the game is paused. When paused, only objects with Entity.Pauseable set to false will continue to Update.
void SetTileAnimationEnabled (integer isEnabled)
 Sets whether tile animation is enabled.
void SetTileAnimSequence (integer tileID, array tileIDs, array frameDurations)
 Sets an animation sequence for a tile ID.
void SetTileAnimSequenceFromSprite (integer tileID, integer spriteIndex, integer animationIndex)
 Sets an animation sequence for a tile ID.
void SetTileAnimSequencePaused (integer tileID, boolean isPaused)
 Pauses a tile ID animation sequence.
void SetTileAnimSequenceSpeed (integer tileID, decimal speed)
 Changes the speed of a tile ID animation sequence.
void SetTileAnimSequenceFrame (integer tileID, integer index)
 Sets the current frame of a tile ID animation sequence.
void SetTilesetPaletteIndex (integer tilesetID, integer paletteIndex)
 Sets the palette index of the specified tileset.
void SetLayerVisible (integer layerIndex, boolean isVisible)
 Sets the visibility of the specified layer.
void SetLayerCollidable (integer layerIndex, boolean isVisible)
 Sets whether the specified layer's tiles can be collided with.
void SetLayerInternalSize ()
 Do not use this.
void SetLayerOffsetPosition (integer layerIndex, number offsetX, number offsetY)
 Sets the camera offset position of the specified layer.
void SetLayerOffsetX (integer layerIndex, number offsetX)
 Sets the camera offset X value of the specified layer.
void SetLayerOffsetY (integer layerIndex, number offsetY)
 Sets the camera offset Y value of the specified layer.
void SetLayerDrawGroup (integer layerIndex, integer drawGroup)
 Sets the draw group of the specified layer.
void SetLayerDrawBehavior (integer layerIndex, DrawBehavior drawBehavior)
 Sets the parallax direction of the layer.
void SetLayerRepeat (integer layerIndex, boolean doesRepeat)
 Sets whether the specified layer repeats.
void SetLayerHorizontalRepeat (integer layerIndex, boolean doesRepeat)
 Sets whether the specified layer repeats horizontally.
void SetLayerVerticalRepeat (integer layerIndex, boolean doesRepeat)
 Sets whether the specified layer repeats vertically.
void SetDrawGroupCount (integer count)
 Sets the amount of draw groups in the active scene.
void SetDrawGroupEntityDepthSorting (integer drawGroup, boolean useEntityDepth)
 Sets the specified draw group to sort objects by depth.
void SetLayerBlend (integer layerIndex, boolean doBlend, BlendMode blendMode)
 Sets whether to use color and alpha blending on this layer.
void SetLayerOpacity (integer layerIndex, decimal opacity)
 Sets the opacity of the layer.
void SetLayerShader (integer layerIndex, Shader shader)
 Sets a shader for the layer.
void SetLayerUsePaletteIndexLines (integer layerIndex, boolean usePaletteIndexLines)
 Enables or disables the use of the global palette index table for the specified layer.
void SetLayerScroll (integer layerIndex, decimal relative, decimal constant)
 Sets the scroll values of the layer. (Horizontal Parallax = Up/Down values, Vertical Parallax = Left/Right values).
void SetLayerSetParallaxLinesBegin (integer layerIndex)
 Begins setup for changing the parallax lines.
void SetLayerSetParallaxLines (integer lineStart, integer lineEnd, number relative, number constant, boolean canDeform)
 Set the parallax lines.
void SetLayerSetParallaxLinesEnd ()
 Ends setup for changing the parallax lines and submits the changes.
void SetLayerTileDeforms (integer layerIndex, integer deformIndex, number deformA, number deformB)
 Sets the tile deforms of the layer at the specified index.
void SetLayerTileDeformSplitLine (integer layerIndex, number deformPosition)
 Sets the position of the Deform Split Line.
void SetLayerTileDeformOffsets (integer layerIndex, number deformAOffset, number deformBOffset)
 Sets the position of the Deform Split Line.
void SetLayerDeformOffsetA (integer layerIndex, number deformA)
 Sets the tile deform offset above the Deform Split Line of the layer.
void SetLayerDeformOffsetB (integer layerIndex, number deformA)
 Sets the tile deform offset below the Deform Split Line of the layer.
void SetLayerCustomScanlineFunction (integer layerIndex, function function)
 Sets the function to be used for generating custom tile scanlines.
void SetTileScanline (integer scanline, number srcX, number srcY, number deltaX, number deltaY, decimal opacity, number maxHorzCells, number maxVertCells)
 Sets the tile scanline (for use only inside a Custom Scanline Function).
void SetLayerCustomRenderFunction (integer layerIndex, function function)
 Sets the function to be used for rendering a specific layer.
void SetObjectViewRender (integer viewIndex, boolean enableViewRender)
 Sets whether entities can render on the specified view.
void SetTileViewRender (integer viewIndex, boolean enableViewRender)
 Sets whether tiles can render on the specified view.

Detailed Description

Functions for manipulating and retrieving information about scenes.

Member Function Documentation

◆ AddTileset()

boolean Scene.AddTileset ( string tileset)

Adds a new tileset into the scene.

Parameters
tilesetPath of tileset to load.
Returns
Returns whether the tileset was added to the scene.

◆ AreTileCollisionsLoaded()

boolean Scene.AreTileCollisionsLoaded ( )

Returns or whether tile collisions are loaded.

Returns
Returns whether tile collisions are loaded.

◆ Change() [1/2]

void Scene.Change ( string category,
string scene )

Changes the current scene.

This does not load the scene. You must call Scene.Load.

Parameters
categoryCategory name. If this is not valid, this function does nothing.
sceneScene name. If the scene name is not found but the category name is, the first scene in the category is used.

◆ Change() [2/2]

void Scene.Change ( string scene)

Changes the current scene.

This does not load the scene. You must call Scene.Load.

Parameters
sceneScene name in the global category. If the scene name is not found, the first scene in the category is used.

◆ GetCurrentCategory()

string Scene.GetCurrentCategory ( )

Gets the current category name of the scene.

Returns
Returns a string value.

◆ GetCurrentFolder()

string Scene.GetCurrentFolder ( )

Gets the current folder of the scene.

Returns
Returns a string value.

◆ GetCurrentID()

string Scene.GetCurrentID ( )

Gets the current ID of the scene.

Returns
Returns a string value.

◆ GetCurrentResourceFolder()

string Scene.GetCurrentResourceFolder ( )

Gets the current resource folder of the scene.

Returns
Returns a string value.

◆ GetDebugMode()

integer Scene.GetDebugMode ( )

Gets whether Debug Mode has been turned on in the current scene.

Returns
Returns an integer value.

◆ GetDrawGroupCount()

integer Scene.GetDrawGroupCount ( )

Gets the amount of draw groups in the active scene.

Returns
Returns an integer value.

◆ GetDrawGroupEntityDepthSorting()

boolean Scene.GetDrawGroupEntityDepthSorting ( integer drawGroup)

Gets if the specified draw group sorts objects by depth.

Parameters
drawGroupNumber between 0 to the result of Scene.GetDrawGroupCount.
Returns
Returns a boolean value.

◆ GetDynamicInstanceCount()

integer Scene.GetDynamicInstanceCount ( )

Gets the count of instances currently in the scene.

Returns
Returns the amount of instances in the scene.

◆ GetFirstInstance()

Entity Scene.GetFirstInstance ( )

Gets the first active instance in the scene.

Returns
Returns the first active instance in the scene, or null if there are no instances in the scene.

◆ GetHeight()

integer Scene.GetHeight ( )

Gets the height of the scene (in tiles).

Returns
Returns an integer value.

◆ GetInstanceCount()

integer Scene.GetInstanceCount ( )

Gets the count of instances currently in the scene.

Returns
Returns the amount of instances in the scene.

◆ GetLastInstance()

Entity Scene.GetLastInstance ( )

Gets the last active instance in the scene.

Returns
Returns the last active instance in the scene, or null if there are no instances in the scene.

◆ GetLayerCount()

integer Scene.GetLayerCount ( )

Gets the amount of layers in the active scene.

Returns
Returns the amount of layers in the active scene.

◆ GetLayerDeformOffsetA()

integer Scene.GetLayerDeformOffsetA ( integer layerIndex)

Gets the tile deform offset above the Deform Split Line of the specified layer.

Parameters
layerIndexIndex of layer.
Returns
Returns an integer value.

◆ GetLayerDeformOffsetB()

integer Scene.GetLayerDeformOffsetB ( integer layerIndex)

Gets the tile deform offset below the Deform Split Line of the specified layer.

Parameters
layerIndexIndex of layer.
Returns
Returns an integer value.

◆ GetLayerDeformSplitLine()

integer Scene.GetLayerDeformSplitLine ( integer layerIndex)

Gets the Deform Split Line of the specified layer.

Parameters
layerIndexIndex of layer.
Returns
Returns an integer value.

◆ GetLayerDrawGroup()

integer Scene.GetLayerDrawGroup ( integer layerIndex)

Gets the draw group of the specified layer.

Parameters
layerIndexIndex of layer.
Returns
Returns an integer value.

◆ GetLayerExists()

boolean Scene.GetLayerExists ( integer layerIndex)

Gets whether a layer exists.

Parameters
layerIndexIndex of layer.
Returns
Returns a boolean value.
Deprecated

◆ GetLayerHeight()

integer Scene.GetLayerHeight ( integer layerIndex)

Gets the height of a layer index (in tiles).

Parameters
layerIndexIndex of layer.
Returns
Returns an integer value.

◆ GetLayerHorizontalRepeat()

boolean Scene.GetLayerHorizontalRepeat ( integer layerIndex)

Gets whether the layer repeats horizontally.

Parameters
layerIndexIndex of layer.
Returns
Returns a boolean value.

◆ GetLayerIndex()

integer Scene.GetLayerIndex ( string layerName)

Gets the layer index of the layer with the specified name.

Parameters
layerNameName of the layer to find.
Returns
Returns the layer index, or -1 if the layer could not be found.

◆ GetLayerName()

string Scene.GetLayerName ( integer layerIndex)

Gets the name of the specified layer.

Parameters
layerIndexIndex of layer.
Returns
Returns a string value.

◆ GetLayerOffsetX()

decimal Scene.GetLayerOffsetX ( integer layerIndex)

Gets the X offset of a layer index.

Parameters
layerIndexIndex of layer.
Returns
Returns a decimal value.

◆ GetLayerOffsetY()

decimal Scene.GetLayerOffsetY ( integer layerIndex)

Gets the Y offset of a layer index.

Parameters
layerIndexIndex of layer.
Returns
Returns a decimal value.

◆ GetLayerOpacity()

decimal Scene.GetLayerOpacity ( integer layerIndex)

Gets the opacity of the specified layer.

Parameters
layerIndexIndex of layer.
Returns
Returns a decimal value.

◆ GetLayerProperty()

value Scene.GetLayerProperty ( integer layerIndex,
string property )

Gets a property of the specified layer.

Parameters
layerIndexIndex of layer.
propertyName of property.
Returns
Returns the property.

◆ GetLayerShader()

Shader Scene.GetLayerShader ( integer layerIndex)

Gets the shader of the specified layer.

Parameters
layerIndexIndex of layer.
Returns
Returns a Shader, or null.

◆ GetLayerUsePaletteIndexLines()

boolean Scene.GetLayerUsePaletteIndexLines ( integer layerIndex)

Gets whether the layer is using the global palette index table.

Parameters
layerIndexIndex of layer.
Returns
Returns a boolean value.

◆ GetLayerVerticalRepeat()

boolean Scene.GetLayerVerticalRepeat ( integer layerIndex)

Gets whether the layer repeats vertically.

Parameters
layerIndexIndex of layer.
Returns
Returns a boolean value.

◆ GetLayerVisible()

boolean Scene.GetLayerVisible ( integer layerIndex)

Gets the visibility of the specified layer.

Parameters
layerIndexIndex of layer.
Returns
Returns a boolean value.

◆ GetLayerWidth()

integer Scene.GetLayerWidth ( integer layerIndex)

Gets the width of a layer index (in tiles).

Parameters
layerIndexIndex of layer.
Returns
Returns an integer value.

◆ GetName()

string Scene.GetName ( )

Gets the name of the active scene.

Returns
Returns the name of the active scene.

◆ GetProperty()

value Scene.GetProperty ( string property)

Gets a property.

Parameters
propertyName of property.
Returns
Returns the property.

◆ GetReservedSlotIDs()

integer Scene.GetReservedSlotIDs ( )

Gets the number of reserved slot IDs to account for before creating instances.

Returns
Returns how many reserved slot IDs are being used.

◆ GetStaticInstanceCount()

integer Scene.GetStaticInstanceCount ( )

Gets the count of instances currently in the scene.

Returns
Returns the amount of instances in the scene.

◆ GetTileAnimationEnabled()

integer Scene.GetTileAnimationEnabled ( )

Gets whether tile animation is enabled.

Returns
Returns 0 if tile animation is disabled, 1 if it's enabled, and 2 if tiles animate even if the scene is paused.

◆ GetTileAnimSequence()

array Scene.GetTileAnimSequence ( integer tileID)

Gets the tile IDs of the animation sequence for a tile ID.

Parameters
tileIDWhich tile ID.
Returns
Returns an array of tile IDs.

◆ GetTileAnimSequenceDurations()

array Scene.GetTileAnimSequenceDurations ( integer tileID)

Gets the frame durations of the animation sequence for a tile ID.

Parameters
tileIDWhich tile ID.
Returns
Returns an array of frame durations.

◆ GetTileAnimSequenceFrame()

integer Scene.GetTileAnimSequenceFrame ( integer tileID)

Gets the current frame of a tile ID animation sequence.

Parameters
tileIDThe tile ID.
Returns
The frame index.

◆ GetTileAnimSequencePaused()

boolean Scene.GetTileAnimSequencePaused ( integer tileID)

Returns whether a tile ID animation sequence is paused.

Parameters
tileIDThe tile ID.
Returns
Whether the animation is paused.

◆ GetTileAnimSequenceSpeed()

decimal Scene.GetTileAnimSequenceSpeed ( integer tileID)

Gets the speed of a tile ID animation sequence.

Parameters
tileIDThe tile ID.
Returns
The frame speed.

◆ GetTileFlipX()

boolean Scene.GetTileFlipX ( integer layer,
number x,
number y )

Gets whether the tile at the tile coordinates is flipped horizontally.

Parameters
layerIndex of the layer
xX position (in tiles) of the tile
yY position (in tiles) of the tile
Returns
Returns whether the tile's horizontally flipped.

◆ GetTileFlipY()

boolean Scene.GetTileFlipY ( integer layer,
number x,
number y )

Gets whether the tile at the tile coordinates is flipped vertically.

Parameters
layerIndex of the layer
xX position (in tiles) of the tile
yY position (in tiles) of the tile
Returns
Returns whether the tile's vertically flipped.

◆ GetTileHeight()

integer Scene.GetTileHeight ( )

Gets the height of tiles.

Returns
Returns an integer value.

◆ GetTileID()

integer Scene.GetTileID ( integer layer,
number x,
number y )

Gets the tile's index number at the tile coordinates.

Parameters
layerIndex of the layer
xX position (in tiles) of the tile
yY position (in tiles) of the tile
Returns
Returns an integer value.

◆ GetTilesetCount()

integer Scene.GetTilesetCount ( )

Gets the amount of tilesets in the current scene.

Returns
Returns an integer value.

◆ GetTilesetFirstTileID()

integer Scene.GetTilesetFirstTileID ( integer tilesetID)

Gets the first tile index number for the specified tileset.

Parameters
tilesetIDThe tileset index.
Returns
Returns an integer value.

◆ GetTilesetIndex()

integer Scene.GetTilesetIndex ( integer tilesetID)

Gets the tileset index for the specified filename.

Parameters
tilesetIDThe tileset index.
Returns
Returns the tileset index, or -1 if there is no tileset with said filename.

◆ GetTilesetName()

string Scene.GetTilesetName ( Index tilesetIndex)

Gets the tileset name for the specified tileset index.

Parameters
tilesetIndexThe tileset index.
Returns
Returns a string value.

◆ GetTilesetPaletteIndex()

integer Scene.GetTilesetPaletteIndex ( integer tilesetID)

Gets the palette index for the specified tileset.

Parameters
tilesetIDThe tileset index.
Returns
Returns an integer value.

◆ GetTilesetTileCount()

integer Scene.GetTilesetTileCount ( integer tilesetID)

Gets the tile count for the specified tileset.

Parameters
tilesetIDThe tileset index.
Returns
Returns an integer value.

◆ GetTileWidth()

integer Scene.GetTileWidth ( )

Gets the width of tiles.

Returns
Returns an integer value.

◆ GetType()

SCENETYPE Scene.GetType ( )

Gets the type of the active scene.

Returns
Returns the type of the active scene.

◆ GetWidth()

integer Scene.GetWidth ( )

Gets the width of the scene (in tiles).

Returns
Returns an integer value.

◆ IsCurrentEntryValid()

boolean Scene.IsCurrentEntryValid ( )

Checks if the current entry in the scene list is valid.

Returns
Returns a boolean value.

◆ IsPaused()

boolean Scene.IsPaused ( )

Gets whether the scene is paused.

Returns
Returns a boolean value.

◆ IsUsingFolder()

boolean Scene.IsUsingFolder ( string folder)

Checks whether the current scene's folder matches the string to check.

Parameters
folderFolder name to compare.
Returns
Returns a boolean value.

◆ IsUsingID()

boolean Scene.IsUsingID ( string id)

Checks whether the current scene's ID matches the string to check.

Parameters
idID to compare.
Returns
Returns a boolean value.

◆ LayerPropertyExists()

boolean Scene.LayerPropertyExists ( integer layerIndex,
string property )

Checks if a property exists in the specified layer.

Parameters
layerIndexIndex of layer.
propertyName of property to check.
Returns
Returns a boolean value.

◆ Load() [1/2]

void Scene.Load ( boolean persistency)

Changes the active scene. The active scene is changed to the currently set entry in the scene list, if it exists (see SceneList.).

Parameters
persistencyWhether the scene should load with persistency.

◆ Load() [2/2]

void Scene.Load ( string filename,
boolean persistency )

Changes the active scene. The active scene is changed to the one in the specified resource file.

Parameters
filenameFilename of scene.
persistencyWhether the scene should load with persistency.

◆ LoadTileCollisions()

void Scene.LoadTileCollisions ( string filename,
integer tilesetID )

Load tile collisions from a resource file.

Parameters
filenameFilename of tile collision file.
tilesetIDTileset to load tile collisions for.

◆ PropertyExists()

boolean Scene.PropertyExists ( string property)

Checks if a property exists.

Parameters
propertyName of property to check.
Returns
Returns a boolean value.

◆ SetDrawGroupCount()

void Scene.SetDrawGroupCount ( integer count)

Sets the amount of draw groups in the active scene.

Parameters
countDraw group count.
Deprecated

◆ SetDrawGroupEntityDepthSorting()

void Scene.SetDrawGroupEntityDepthSorting ( integer drawGroup,
boolean useEntityDepth )

Sets the specified draw group to sort objects by depth.

Parameters
drawGroupNumber between 0 to the result of Scene.GetDrawGroupCount.
useEntityDepthWhether to sort objects by depth.

◆ SetLayerBlend()

void Scene.SetLayerBlend ( integer layerIndex,
boolean doBlend,
BlendMode blendMode )

Sets whether to use color and alpha blending on this layer.

Parameters
layerIndexIndex of layer.
doBlendWhether to use blending.
blendModeThe desired blend mode.

◆ SetLayerCollidable()

void Scene.SetLayerCollidable ( integer layerIndex,
boolean isVisible )

Sets whether the specified layer's tiles can be collided with.

Parameters
layerIndexIndex of layer.
isVisibleWhether the layer can be collided with.

◆ SetLayerCustomRenderFunction()

void Scene.SetLayerCustomRenderFunction ( integer layerIndex,
function function )

Sets the function to be used for rendering a specific layer.

Parameters
layerIndexIndex of layer.
functionFunction to call to render the layer. (Use null to reset functionality.)

◆ SetLayerCustomScanlineFunction()

void Scene.SetLayerCustomScanlineFunction ( integer layerIndex,
function function )

Sets the function to be used for generating custom tile scanlines.

Parameters
layerIndexIndex of layer.
functionFunction to be used before tile drawing for generating scanlines. (Use null to reset functionality.)

◆ SetLayerDeformOffsetA()

void Scene.SetLayerDeformOffsetA ( integer layerIndex,
number deformA )

Sets the tile deform offset above the Deform Split Line of the layer.

Parameters
layerIndexIndex of layer.
deformADeform value above the Deform Split Line.

◆ SetLayerDeformOffsetB()

void Scene.SetLayerDeformOffsetB ( integer layerIndex,
number deformA )

Sets the tile deform offset below the Deform Split Line of the layer.

Parameters
layerIndexIndex of layer.
deformADeform value below the Deform Split Line.

◆ SetLayerDrawBehavior()

void Scene.SetLayerDrawBehavior ( integer layerIndex,
DrawBehavior drawBehavior )

Sets the parallax direction of the layer.

Parameters
layerIndexIndex of layer.
drawBehaviorThe draw behavior.

◆ SetLayerDrawGroup()

void Scene.SetLayerDrawGroup ( integer layerIndex,
integer drawGroup )

Sets the draw group of the specified layer.

Parameters
layerIndexIndex of layer.
drawGroupNumber between 0 to the result of Scene.GetDrawGroupCount.

◆ SetLayerHorizontalRepeat()

void Scene.SetLayerHorizontalRepeat ( integer layerIndex,
boolean doesRepeat )

Sets whether the specified layer repeats horizontally.

Parameters
layerIndexIndex of layer.
doesRepeatWhether the layer repeats horizontally.

◆ SetLayerOffsetPosition()

void Scene.SetLayerOffsetPosition ( integer layerIndex,
number offsetX,
number offsetY )

Sets the camera offset position of the specified layer.

Parameters
layerIndexIndex of layer.
offsetXOffset X position.
offsetYOffset Y position.

◆ SetLayerOffsetX()

void Scene.SetLayerOffsetX ( integer layerIndex,
number offsetX )

Sets the camera offset X value of the specified layer.

Parameters
layerIndexIndex of layer.
offsetXOffset X position.

◆ SetLayerOffsetY()

void Scene.SetLayerOffsetY ( integer layerIndex,
number offsetY )

Sets the camera offset Y value of the specified layer.

Parameters
layerIndexIndex of layer.
offsetYOffset Y position.

◆ SetLayerOpacity()

void Scene.SetLayerOpacity ( integer layerIndex,
decimal opacity )

Sets the opacity of the layer.

Parameters
layerIndexIndex of layer.
opacityOpacity from 0.0 to 1.0.

◆ SetLayerRepeat()

void Scene.SetLayerRepeat ( integer layerIndex,
boolean doesRepeat )

Sets whether the specified layer repeats.

Parameters
layerIndexIndex of layer.
doesRepeatWhether the layer repeats.

◆ SetLayerScroll()

void Scene.SetLayerScroll ( integer layerIndex,
decimal relative,
decimal constant )

Sets the scroll values of the layer. (Horizontal Parallax = Up/Down values, Vertical Parallax = Left/Right values).

Parameters
layerIndexIndex of layer.
relativeHow much to move the layer relative to the camera. (0.0 = no movement, 1.0 = moves opposite to speed of camera, 2.0 = moves twice the speed opposite to camera)
constantHow many pixels to move the layer per frame.

◆ SetLayerSetParallaxLines()

void Scene.SetLayerSetParallaxLines ( integer lineStart,
integer lineEnd,
number relative,
number constant,
boolean canDeform )

Set the parallax lines.

Parameters
lineStartStart line.
lineEndEnd line.
relativeHow much to move the scroll line relative to the camera. (0.0 = no movement, 1.0 = moves opposite to speed of camera, 2.0 = moves twice the speed opposite to camera)
constantHow many pixels to move the layer per frame.
canDeformWhether the parallax lines can be deformed.

◆ SetLayerSetParallaxLinesBegin()

void Scene.SetLayerSetParallaxLinesBegin ( integer layerIndex)

Begins setup for changing the parallax lines.

Parameters
layerIndexIndex of layer.

◆ SetLayerShader()

void Scene.SetLayerShader ( integer layerIndex,
Shader shader )

Sets a shader for the layer.

Parameters
layerIndexIndex of layer.
shaderThe shader, or null to unset the shader.

◆ SetLayerTileDeformOffsets()

void Scene.SetLayerTileDeformOffsets ( integer layerIndex,
number deformAOffset,
number deformBOffset )

Sets the position of the Deform Split Line.

Parameters
layerIndexIndex of layer.
deformAOffsetOffset for the deforms above the Deform Split Line.
deformBOffsetOffset for the deforms below the Deform Split Line.

◆ SetLayerTileDeforms()

void Scene.SetLayerTileDeforms ( integer layerIndex,
integer deformIndex,
number deformA,
number deformB )

Sets the tile deforms of the layer at the specified index.

Parameters
layerIndexIndex of layer.
deformIndexIndex of deform value.
deformADeform value above the Deform Split Line.
deformBDeform value below the Deform Split Line.

◆ SetLayerTileDeformSplitLine()

void Scene.SetLayerTileDeformSplitLine ( integer layerIndex,
number deformPosition )

Sets the position of the Deform Split Line.

Parameters
layerIndexIndex of layer.
deformPositionThe position on screen where the Deform Split Line should be. (Y when horizontal parallax, X when vertical.)

◆ SetLayerUsePaletteIndexLines()

void Scene.SetLayerUsePaletteIndexLines ( integer layerIndex,
boolean usePaletteIndexLines )

Enables or disables the use of the global palette index table for the specified layer.

Parameters
layerIndexIndex of layer.
usePaletteIndexLinesWhether the layer is using the global palette index table.

◆ SetLayerVerticalRepeat()

void Scene.SetLayerVerticalRepeat ( integer layerIndex,
boolean doesRepeat )

Sets whether the specified layer repeats vertically.

Parameters
layerIndexIndex of layer.
doesRepeatWhether the layer repeats vertically.

◆ SetLayerVisible()

void Scene.SetLayerVisible ( integer layerIndex,
boolean isVisible )

Sets the visibility of the specified layer.

Parameters
layerIndexIndex of layer.
isVisibleWhether the layer can be seen.

◆ SetObjectViewRender()

void Scene.SetObjectViewRender ( integer viewIndex,
boolean enableViewRender )

Sets whether entities can render on the specified view.

Parameters
viewIndexIndex of the view.
enableViewRenderWhether entities can render on the specified view.

◆ SetPaused()

void Scene.SetPaused ( boolean isPaused)

Sets whether the game is paused. When paused, only objects with Entity.Pauseable set to false will continue to Update.

Parameters
isPausedWhether the scene is paused.

◆ SetReservedSlotIDs()

void Scene.SetReservedSlotIDs ( integer amount)

Sets the number of reserved slot IDs to account for before creating instances.

Parameters
amountHow many reserved slot IDs to use.

◆ SetTile()

void Scene.SetTile ( integer layer,
number cellX,
number cellY,
integer tileID,
boolean flipX,
boolean flipY,
integer collisionMaskA,
integer collisionMaskB )

Sets the tile at a position.

Parameters
layerLayer index.
cellXTile cell X.
cellYTile cell Y.
tileIDTile ID.
flipXWhether to flip the tile horizontally.
flipYWhether to flip the tile vertically.
collisionMaskACollision mask to use for the tile on Plane A. (0: No collision, 1: Top-side collision only, 2: Left-right-bottom-side collision only, 3: All-side collision)
collisionMaskBCollision mask to use for the tile on Plane B. (0: No collision, 1: Top-side collision only, 2: Left-right-bottom-side collision only, 3: All-side collision)

◆ SetTileAnimationEnabled()

void Scene.SetTileAnimationEnabled ( integer isEnabled)

Sets whether tile animation is enabled.

Parameters
isEnabled0 disables tile animation, 1 enables it, and 2 makes tiles animate even if the scene is paused.

◆ SetTileAnimSequence()

void Scene.SetTileAnimSequence ( integer tileID,
array tileIDs,
array frameDurations )

Sets an animation sequence for a tile ID.

Parameters
tileIDWhich tile ID to add an animated sequence to.
tileIDsTile ID list.
frameDurationsFrame duration list.

◆ SetTileAnimSequenceFrame()

void Scene.SetTileAnimSequenceFrame ( integer tileID,
integer index )

Sets the current frame of a tile ID animation sequence.

Parameters
tileIDThe tile ID.
indexThe frame index.

◆ SetTileAnimSequenceFromSprite()

void Scene.SetTileAnimSequenceFromSprite ( integer tileID,
integer spriteIndex,
integer animationIndex )

Sets an animation sequence for a tile ID.

Parameters
tileIDWhich tile ID to add an animated sequence to.
spriteIndexSprite index. (null to disable)
animationIndexAnimation index in sprite.

◆ SetTileAnimSequencePaused()

void Scene.SetTileAnimSequencePaused ( integer tileID,
boolean isPaused )

Pauses a tile ID animation sequence.

Parameters
tileIDThe tile ID.
isPausedWhether the animation is paused.

◆ SetTileAnimSequenceSpeed()

void Scene.SetTileAnimSequenceSpeed ( integer tileID,
decimal speed )

Changes the speed of a tile ID animation sequence.

Parameters
tileIDThe tile ID.
speedThe frame speed.

◆ SetTileCollisionSides()

void Scene.SetTileCollisionSides ( integer layer,
number cellX,
number cellY,
integer collisionMaskA,
integer collisionMaskB )

Sets the collision of a tile at a position.

Parameters
layerLayer index.
cellXTile cell X.
cellYTile cell Y.
collisionMaskACollision mask to use for the tile on Plane A. (0: No collision, 1: Top-side collision only, 2: Left-right-bottom-side collision only, 3: All-side collision)
collisionMaskBCollision mask to use for the tile on Plane B. (0: No collision, 1: Top-side collision only, 2: Left-right-bottom-side collision only, 3: All-side collision)

◆ SetTileScanline()

void Scene.SetTileScanline ( integer scanline,
number srcX,
number srcY,
number deltaX,
number deltaY,
decimal opacity,
number maxHorzCells,
number maxVertCells )

Sets the tile scanline (for use only inside a Custom Scanline Function).

Parameters
scanlineIndex of scanline to edit.
srcX
srcY
deltaX
deltaY
opacity
maxHorzCells
maxVertCells

◆ SetTilesetPaletteIndex()

void Scene.SetTilesetPaletteIndex ( integer tilesetID,
integer paletteIndex )

Sets the palette index of the specified tileset.

Parameters
tilesetIDThe tileset index.
paletteIndexThe palette index.

◆ SetTileViewRender()

void Scene.SetTileViewRender ( integer viewIndex,
boolean enableViewRender )

Sets whether tiles can render on the specified view.

Parameters
viewIndexIndex of the view.
enableViewRenderWhether tiles can render on the specified view.