Page 1 of 1

scripting elevations?

Posted: Sun Nov 16, 2014 4:14 pm
by THOM
Is it possible to set a specific floortile from elevation 0 to -1 by scripting?

Re: scripting elevations?

Posted: Sun Nov 16, 2014 6:34 pm
by Batty
You can use GameObject:setPosition(x, y, facing, elevation, level) like this:

Code: Select all

floortile_1:setPosition(floortile_1.x, floortile_1.y, floortile_1.facing, -1, floortile_1.level)
or you can use this script to move an object down 1 square:

Code: Select all

local coord = floortile_1:getWorldPosition()
coord[2] = coord[2] - 3
floortile_1:setWorldPosition(coord)

Re: scripting elevations?

Posted: Sun Nov 16, 2014 7:43 pm
by THOM
Well - I don't mean an object - I am talking about an landcape tile. Lets say a forest_ground tile.

Is there a possibility?

In case, that you also were talking about that - how is the name of a forest-/beach-/dungeon-/watever-groundtil?

Re: scripting elevations?

Posted: Mon Nov 17, 2014 7:49 am
by Isaac
Tile elevations are definitely loaded before the level starts; they are written on the base map, and I suspect, impossible to move. What you could do is move a bridge asset up or down. This could of course mean an entire floor of custom floor-tile [placeables].