World.SetTileHeight

Declaration

World.SetTileHeight(Vector2 Position, number Layer, number Height, number ExtendCount)

Description

Sets the desired Height and ExtendCount on a specific tile at Position on Layer.

--Sets the tile height at position "target" and "layer" 0 to 3 and extend count to 1
local target = V2(1, 2);
local layer = 0;
local height = 3;
local extendCount = 1;

World.SetTileHeight(target, layer, height, extendCount);

Declaration

World.SetTileHeight(Dictionary<Vector2> Positions, number Layer, number Height, number ExtendCount)

Description

Sets the desired Height and ExtendCount on specific tiles at Positions on Layer.

--Sets the tile height at provided positions to 3 and extend count to 1
local targets = {V2(1, 2), V2(1, 3), V2(1, 4), V2(1, 5), V2(2,2), V2(2,3), V2(2,4), V2(2,5)};
local layer = 0;
local height = 3;
local extendCount = 1;

World.SetTileHeight(targets, layer, height, extendCount);

Declaration

World.SetTileHeight(Vector2 Position, number Layer, number Height, number ExtendCount, bool Relative, Vector2 Origin)

Description

Sets the desired Height and ExtendCount on a specific tile at Position on Layer. Position can be relative to Origin if Relative parameter is true.

--Sets the tile height on the tile above the ScriptTile to 3 and extend count to 1
local currentScriptTile = GetCurrentTile();
local layer = 0;
local height = 3;
local extendCount = 1;

World.SetTileHeight(V2(0, 1), layer, height, extendCount, true, currentScriptTile.Position);

Declaration

World.SetTileHeight(Dictionary<Vector2> Positions, number Layer, number Height, number ExtendCount, bool Relative, Vector2 Origin)

Description

Sets the desired Height and ExtendCount on specific tiles at Positions on Layer. Positions can be relative to Origin if Relative parameter is true.

--Sets the tile height on all the tiles around the ScriptTile to 3 and extend count to 1
local currentScriptTile = GetCurrentTile();
local targets = {V2(0, 1), V2(1, 1), V2(1, 0), V2(-1, 0), V2(-1, -1), V2(0, -1), V2(1, -1), V2(-1, 1)}
local layer = 0;
local height = 3;
local extendCount = 1;

World.SetTileHeight(targets, layer, height, extendCount, true, currentScriptTile.Position);