This is the code for a drawbridge I was working on a while back...
Never did figure out why I can't walk it?
I can walk along the center for about 2 nodes then... woosh, fall through.
What am I doing wrong? (I should be able to figure this out by now but.... : / )
I just tried again today, but only for about 5 minutes and said "screw it", maybe someone else will see what I did wrong, right off the bat... :P
I also have an obj model but, it works this way... well,
visually anyway
Any help will be greatly appreciated... ten-Q
Code: Select all
minetest.register_node("castle_features:drawbridge_raised", {
description = "Drawbridge Raised",
drawtype = "nodebox",
tiles = {"bridge_timber.png"},
paramtype = "light",
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {
{-2.5, 0.25, 0.25, 2.5, 5.3125, 0.5},
},
},
sounds = default.node_sound_wood_defaults(),
groups = {choppy=2, wood=1,oddly_breakable_by_hand=3,flammable=3},
on_rightclick = function(pos, node, puncher)
minetest.swap_node(pos, {name = "castle_features:drawbridge_lowered", param2 = node.param2})
end,
})
minetest.register_node("castle_features:drawbridge_lowered", {
description = "Drawbridge Lowered",
drawtype = "nodebox",
tiles = {"bridge_timber.png"},
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
node_box = {
type = "fixed",
fixed = {
{-2.5, 0.25, -4.5, 2.5, 0.5, 0.5},
},
},
collision_box = {
type = "fixed",
fixed = {
{-2.5, 0.25, -4.5, 2.5, 0.5, 0.5},
},
},
groups = {choppy=2,wood=1,oddly_breakable_by_hand=3,flammable=3},
sounds = default.node_sound_wood_defaults(),
on_rightclick = function(pos, node, puncher)
minetest.swap_node(pos, {name = "castle_features:drawbridge_raised", param2 = node.param2})
end,
drop = "castle_features:drawbridge_raised",
})