If I set the
on_fly function variable (instead of declaring it directly, like the test dungeon does) then DSB crashes... it doesn't seem to be calling the function correctly (incorrect parameters)
Code: Select all
function crazy_axe_on_fly(id, x_curr, y_curr, tile_curr, face, flytimer)
dsb_write({255,255,255}, "OBJECT "..id.." is at "..x.." , "..y.." (facing: "..face)
end
obj.crazy_axe = clone_arch(obj.axe, {
name = "CRAZY AXE",
on_fly = crazy_axe_on_fly,
} )
This code should work. But it crashes, telling me that the "id" variable is invalid