Re: can tiles be elevated / lowered?
Posted: Sat Oct 19, 2013 8:19 pm
Isaac is posting something too, meanwhile I did some quick tests.
It's possible to consistenty move in an elevated or lowered position, but it involves some fancy spawning and destroying of stairs.
Basically, on each OnMove you have to
- spawn an opposite facing stair 2 squares in front of the party (to lift the square ahead)
- destroy the previous one 1 square in the front (or it blocks movement)
- spawn a same facing stair 1 square behind (to lift the current square or else the above line brings back the party down)
Example (crude) code:
and video:

(md_invisible_stairs_up courtesy of mahric)
if the first stair is already placed at a fixed position instead of being directly swpawned, you get a smooth transition.
It's possible to consistenty move in an elevated or lowered position, but it involves some fancy spawning and destroying of stairs.
Basically, on each OnMove you have to
- spawn an opposite facing stair 2 squares in front of the party (to lift the square ahead)
- destroy the previous one 1 square in the front (or it blocks movement)
- spawn a same facing stair 1 square behind (to lift the current square or else the above line brings back the party down)
Example (crude) code:
Code: Select all
onMove = function(party, direction)
if direction == 0 then
if testStairs then testStairs:destroy() end
if testStairs2 then testStairs2:destroy() end
spawn("md_invisible_stairs_up", 1, party.x, party.y - 2, 2, "testStairs");
spawn("md_invisible_stairs_up", 1, party.x, party.y + 1, 0, "testStairs2");
end
end

(md_invisible_stairs_up courtesy of mahric)
if the first stair is already placed at a fixed position instead of being directly swpawned, you get a smooth transition.


