Remember that if you change the hero's layer and not the tile's layer, the hero may disappear of strange things may happen if you don't have any corresponding tiles above or below. How about using dynamic layers that appear or disappear as you traverse the sensor?
I'm pretty sure that with just having tiles beneath the bridge in low layer and making the bridge intermediate layer you should get the effect that you want. However, you need a stairs type entity to traverse between layers in an easy manner.
However, if you're dead set on moving up or down a layer forcefully, you could use the sensor to simply change the layer. An example:
function layer_change:on_activated() -- layer_change is a sensor
local x, y, layer = hero:get_position()
if layer == 0 then
hero:set_position(x,y,0)
else
hero:set_position(x,y,1)
end
That should work. You could use that on an area on the map that looks like you're going up or down a hill to visualize the change of layer.
EDIT:
To make the transition smoother, you could dedicate one sensor each per layer change. That way you can make sure it happens smoothly.