I haven't tested if it works, but it is based on a 2-dimensional teleporter without the el variable. I don't know what the exact relation is between elevation and level and I also don't know if increment of 1 works with elevation. Of course if you move to a spot with nothing underneath you should fall and get fall damage.
Code: Select all
function Move(st,el)
fa = party.facing le = party.level xx = party.x yy = party.y zz = party.elevation dx, dy = getForward(fa)
if el == nil then el = 0
party:setPosition(xx + dx * st, yy + dy * st, fa, zz+el, le)
end
Move(1) moves you 1 step forward, Move(0,1) should move you 1 elevation up and Move(1,1) should do both. If you want to move up but not fall use spawn("magic_bridge").item:setPosition(xx + dx * st, yy + dy * st, fa, zz+el, le) first. This might become an obstacle later, so to remove it a timer could be used. Maybe it can become the 3rd variable br in Move(st,el,br) but that is above my lua knowledge.
Any help to make it complete and working is appreciated.