Skip to content

Trigger API Reference DCEI Functions Terrain1

BlackTower edited this page Aug 15, 2022 · 8 revisions
Table of Contents
- [Trigger API Reference\DCEI Functions\Terrain (2/2)](#trigger-api-referencedcei-functionsterrain-22) * [int AddLineWithSprite(Float3 startPos, Float3 endPos, float width, ColorRGBA color, string spriteName, float tex_multiplier)](#int-addlinewithspritefloat3-startpos-float3-endpos-float-width-colorrgba-color-string-spritename-float-tex_multiplier) * [int AddLineWithSpriteColorRGBA(Float3 startPos, Float3 endPos, float width, ColorRGBA color, string spriteName, float tex_multiplier)](#int-addlinewithspritecolorrgbafloat3-startpos-float3-endpos-float-width-colorrgba-color-string-spritename-float-tex_multiplier) * [void RemoveLine(int lineId)](#void-removelineint-lineid) * [void MoveLineWithInterpolation(int lineId, Float3 startPos, Float3 endPos, float duration)](#void-movelinewithinterpolationint-lineid-float3-startpos-float3-endpos-float-duration) * [void RemoveAllLines()](#void-removealllines) * [void ChangeLineColor(int lineId, ColorRGBA color)](#void-changelinecolorint-lineid-colorrgba-color) * [void ChangeLineColorRGBA(int lineId, ColorRGBA color)](#void-changelinecolorrgbaint-lineid-colorrgba-color) * [void ChangeLineDisplay(int lineId, bool display)](#void-changelinedisplayint-lineid-bool-display) * [int AddGrid(Float3 center, float width, float height, int xCount, int zCount, float lineWidth, ColorRGBA color, bool rectCap)](#int-addgridfloat3-center-float-width-float-height-int-xcount-int-zcount-float-linewidth-colorrgba-color-bool-rectcap) * [int AddGridColorRGBA(Float3 center, float width, float height, int xCount, int zCount, float lineWidth, ColorRGBA color, bool rectCap)](#int-addgridcolorrgbafloat3-center-float-width-float-height-int-xcount-int-zcount-float-linewidth-colorrgba-color-bool-rectcap) * [int AddGridWithSprite(Float3 center, float width, float height, int xCount, int zCount, float lineWidth, ColorRGBA color, string spriteName, float tex_multiplier)](#int-addgridwithspritefloat3-center-float-width-float-height-int-xcount-int-zcount-float-linewidth-colorrgba-color-string-spritename-float-tex_multiplier) * [int AddGridWithSpriteColorRGBA(Float3 center, float width, float height, int xCount, int zCount, float lineWidth, ColorRGBA color, string spriteName, float tex_multiplier)](#int-addgridwithspritecolorrgbafloat3-center-float-width-float-height-int-xcount-int-zcount-float-linewidth-colorrgba-color-string-spritename-float-tex_multiplier) * [void RemoveGrid(int gridId)](#void-removegridint-gridid) * [void SetBlurredScreenCaptureAsBackground(bool set, float duration)](#void-setblurredscreencaptureasbackgroundbool-set-float-duration)

Trigger API Reference\DCEI Functions\Terrain (2/2) {Trigger-API-ReferenceDCEI-FunctionsTerrain-22}

int AddLineWithSprite(Float3 startPos, Float3 endPos, float width, ColorRGBA color, string spriteName, float tex_multiplier) {int-AddLineWithSpriteFloat3-startPos-Float3-endPos-float-width-ColorRGBA-color-string-spriteName-float-tex_multiplier}

int AddLineWithSprite(Float3 startPos, Float3 endPos, float width, ColorRGBA color, string spriteName, float tex_multiplier)

Description

Draws a line on the terrain using repeating sprites. Returns the lineId of the created line if successful.

Parameters

  • Float3 startPos the starting coordinates for the line.
  • Float3 endPos the ending coordinates for the line.
  • float width the width of the line, in terms of tiles.
  • ColorRGBA color the RGBA values for the line.
  • string spriteName the name of the sprite to draw.
  • float tex_multiplier the multiplier for sprite scaling.

Example Usage

DCEI.AddLineWithSprite({x = 15, y = 1, z = 1}, {x = 15, y = 1, z = 30}, 1, {r = 0.5, g = 0.5, b = 0, a = 0.5}, "airship_onMap", 1)

int AddLineWithSpriteColorRGBA(Float3 startPos, Float3 endPos, float width, ColorRGBA color, string spriteName, float tex_multiplier) {int-AddLineWithSpriteColorRGBAFloat3-startPos-Float3-endPos-float-width-ColorRGBA-color-string-spriteName-float-tex_multiplier}

int AddLineWithSpriteColorRGBA(Float3 startPos, Float3 endPos, float width, ColorRGBA color, string spriteName, float tex_multiplier)

Description

Draws a line on the terrain using repeating sprites. Returns the lineId of the created line if successful.

Parameters

  • Float3 startPos the starting coordinates for the line.
  • Float3 endPos the ending coordinates for the line.
  • float width the width of the line, in terms of tiles.
  • ColorRGBA color the RGBA values for the line.
  • string spriteName the name of the sprite to draw.
  • float tex_multiplier the multiplier for sprite scaling.

Example Usage

DCEI.AddLineWithSprite({x = 15, y = 1, z = 1}, {x = 15, y = 1, z = 30}, 1, {r = 0.5, g = 0.5, b = 0, a = 0.5}, "airship_onMap", 1)

void RemoveLine(int lineId) {void-RemoveLineint-lineId}

void RemoveLine(int lineId)

Description

Removes a line.

Parameters

  • int lineId the ID of the line to remove.

Example Usage

DCEI.RemoveLine(1)

void MoveLineWithInterpolation(int lineId, Float3 startPos, Float3 endPos, float duration) {void-MoveLineWithInterpolationint-lineId-Float3-startPos-Float3-endPos-float-duration}

void MoveLineWithInterpolation(int lineId, Float3 startPos, Float3 endPos, float duration)

Description

Moves a line's start and end points (and thus the line itself) to new locations over the given duration.

Parameters

  • int lineId the ID of the line to move.
  • Float3 startPos the new starting coordinates for the line.
  • Float3 endPos the new ending coordinates for the line.
  • float duration the duration of the line's movement.

Example Usage

DCEI.MoveLineWithInterpolation(2, {x = 1, y = 1, z = 15}, {x = 30, y = 1, z = 15}, 3)

void RemoveAllLines() {void-RemoveAllLines}

void RemoveAllLines()

Description

Removes all lines.

Example Usage

DCEI.RemoveAllLines()

void ChangeLineColor(int lineId, ColorRGBA color) {void-ChangeLineColorint-lineId-ColorRGBA-color}

void ChangeLineColor(int lineId, ColorRGBA color)

Description

Changes a line's color.

Parameters

  • int lineId the ID of the line.
  • ColorRGBA color the RGBA values for the line.

Example Usage

DCEI.ChangeLineColor(1, {r = 0.5, g = 0.5, b = 0, a = 0.5},)

void ChangeLineColorRGBA(int lineId, ColorRGBA color) {void-ChangeLineColorRGBAint-lineId-ColorRGBA-color}

void ChangeLineColorRGBA(int lineId, ColorRGBA color)

Description

Changes a line's color.

Parameters

  • int lineId the ID of the line.
  • ColorRGBA color the RGBA values for the line.

Example Usage

DCEI.ChangeLineColor(1, {r = 0.5, g = 0.5, b = 0, a = 0.5},)

void ChangeLineDisplay(int lineId, bool display) {void-ChangeLineDisplayint-lineId-bool-display}

void ChangeLineDisplay(int lineId, bool display)

Description

Toggles the display of a line.

Parameters

  • int lineId the ID of the line.
  • bool display if true, displays the line.

Example Usage

DCEI.ChangeLineDisplay(1, false)

int AddGrid(Float3 center, float width, float height, int xCount, int zCount, float lineWidth, ColorRGBA color, bool rectCap) {int-AddGridFloat3-center-float-width-float-height-int-xCount-int-zCount-float-lineWidth-ColorRGBA-color-bool-rectCap}

int AddGrid(Float3 center, float width, float height, int xCount, int zCount, float lineWidth, ColorRGBA color, bool rectCap)

Description

Draws a grid with lines. Returns a gridId integer if successful.

Parameters

  • Float3 center the coordinates for the center of the grid.
  • float width the width of the grid (in tiles).
  • float height the height of the grid (in tiles).
  • int xCount the number of columns (along the x axis).
  • int zCount the number of rows (along the z axis).
  • float lineWidth the width of the grid lines.
  • ColorRGBA color the RGBA values for the line.
  • bool rectCap if true, the ends of the grid lines are rectangular instead of rounded.

Example Usage

DCEI.AddGrid({x = 16, y = 0.5, z = 16}, 15, 15, 5, 15, 0.1, {r = 0.5, g = 0.5, b = 0, a = 0.5}, false)

int AddGridColorRGBA(Float3 center, float width, float height, int xCount, int zCount, float lineWidth, ColorRGBA color, bool rectCap) {int-AddGridColorRGBAFloat3-center-float-width-float-height-int-xCount-int-zCount-float-lineWidth-ColorRGBA-color-bool-rectCap}

int AddGridColorRGBA(Float3 center, float width, float height, int xCount, int zCount, float lineWidth, ColorRGBA color, bool rectCap)

Description

Draws a grid with lines. Returns a gridId integer if successful.

Parameters

  • Float3 center the coordinates for the center of the grid.
  • float width the width of the grid (in tiles).
  • float height the height of the grid (in tiles).
  • int xCount the number of columns (along the x axis).
  • int zCount the number of rows (along the z axis).
  • float lineWidth the width of the grid lines.
  • ColorRGBA color the RGBA values for the line.
  • bool rectCap if true, the ends of the grid lines are rectangular instead of rounded.

Example Usage

DCEI.AddGrid({x = 16, y = 0.5, z = 16}, 15, 15, 5, 15, 0.1, {r = 0.5, g = 0.5, b = 0, a = 0.5}, false)

int AddGridWithSprite(Float3 center, float width, float height, int xCount, int zCount, float lineWidth, ColorRGBA color, string spriteName, float tex_multiplier) {int-AddGridWithSpriteFloat3-center-float-width-float-height-int-xCount-int-zCount-float-lineWidth-ColorRGBA-color-string-spriteName-float-tex_multiplier}

int AddGridWithSprite(Float3 center, float width, float height, int xCount, int zCount, float lineWidth, ColorRGBA color, string spriteName, float tex_multiplier)

Description

Draws a grid with lines made of repeating sprites. Returns a gridId integer if successful.

Parameters

  • Float3 center the coordinates for the center of the grid.
  • float width the width of the grid (in tiles).
  • float height the height of the grid (in tiles).
  • int xCount the number of columns (along the x axis).
  • int zCount the number of rows (along the z axis).
  • float lineWidth the width of the grid lines.
  • ColorRGBA color the RGBA values for the line.
  • string spriteName the name of the sprite to draw.
  • float tex_multiplier the multiplier for sprite scaling.

Example Usage

DCEI.AddGridWithSprite({x = 16, y = 0.5, z = 16}, 15, 15, 5, 15, 0.5, {r = 0.5, g = 0.5, b = 0, a = 0.5}, "airship_onMap", 1)

int AddGridWithSpriteColorRGBA(Float3 center, float width, float height, int xCount, int zCount, float lineWidth, ColorRGBA color, string spriteName, float tex_multiplier) {int-AddGridWithSpriteColorRGBAFloat3-center-float-width-float-height-int-xCount-int-zCount-float-lineWidth-ColorRGBA-color-string-spriteName-float-tex_multiplier}

int AddGridWithSpriteColorRGBA(Float3 center, float width, float height, int xCount, int zCount, float lineWidth, ColorRGBA color, string spriteName, float tex_multiplier)

Description

Draws a grid with lines made of repeating sprites. Returns a gridId integer if successful.

Parameters

  • Float3 center the coordinates for the center of the grid.
  • float width the width of the grid (in tiles).
  • float height the height of the grid (in tiles).
  • int xCount the number of columns (along the x axis).
  • int zCount the number of rows (along the z axis).
  • float lineWidth the width of the grid lines.
  • ColorRGBA color the RGBA values for the line.
  • string spriteName the name of the sprite to draw.
  • float tex_multiplier the multiplier for sprite scaling.

Example Usage

DCEI.AddGridWithSprite({x = 16, y = 0.5, z = 16}, 15, 15, 5, 15, 0.5, {r = 0.5, g = 0.5, b = 0, a = 0.5}, "airship_onMap", 1)

void RemoveGrid(int gridId) {void-RemoveGridint-gridId}

void RemoveGrid(int gridId)

Description

Removes a grid.

Parameters

  • int gridId the ID of the grid to remove.

Example Usage

DCEI.RemoveGrid(1)

void SetBlurredScreenCaptureAsBackground(bool set, float duration) {void-SetBlurredScreenCaptureAsBackgroundbool-set-float-duration}

void SetBlurredScreenCaptureAsBackground(bool set, float duration)

Description

Toggles a blurred version of your terrain in the background. Note that this background renders underneath the terrain, so you may need to move your game camera to see it.

Parameters

  • bool set if true, enables the blurred background.
  • float duration the transition duration.

Example Usage

DCEI.SetBlurredScreenCaptureAsBackground(true, 5)

Clone this wiki locally