IPushButton2653 wrote:1x2 door = make texture twice as high and play around with the init.lua........but first, get that sucker to move!!!
ironzorg wrote:The hatches mod uses a special variable (param2), and it shouldn't be (but it still works because I overwrite it with a good value). The thing is: you can't use it for wall mounted blocks such as ladders and doors because that same param2 variable is used to determine the orientation/position of the block.
If you want to make a door mod, the hatches mod code is not the way to go !
sapier wrote:@randomproof as far as i know you can't attach metadata to a node only to entrys am I wrong?
minetest.register_node("doors:doorhandle_wood", {
tile_images = {"doors_wood_handle.png"},
inventory_image = minetest.inventorycube("doors_wood_handle.png"),
is_ground_content = false,
furnace_burntime = 7,
material = minetest.digprop_woodlike(0.75),
metadata_name = "generic" <---------------------See here!
})
minetest.register_on_placenode(function(pos, newnode, placer)
if string.match(newnode.name, "doors:doorhandle_") ~= nil then
local meta = minetest.env:get_meta(pos) <---------------------See here!
meta:set_infotext("Punch Here To Open/Close Door") <---------------------See here!
end
end)
minetest.register_on_punchnode(function(pos, node, puncher)
if string.match(node.name, "doors:doorhandle_") ~= nil then
if puncher:get_wield_digging_properties().dt_crumbliness ~= 0 then
return
end
local meta = minetest.env:get_meta(pos) <---------------------See here!
meta:set_infotext(infotext) <---------------------See here!
pivot_node = meta:get_string("pivot_node") <---------------------See here!
meta:set_string("pivot_node", pivot_node) <---------------------See here!
...
Users browsing this forum: No registered users and 38 guests