Code: Select all
...
local vi = area:index(locx, starty, locz)
data[vi] = minetest.get_content_id("doors:door_wood_b_1")
local vi = area:index(locx, starty+i -1, locz)
data[vi] = minetest.get_content_id("doors:door_wood_t_1")
...
Cheers Smitje
Code: Select all
...
local vi = area:index(locx, starty, locz)
data[vi] = minetest.get_content_id("doors:door_wood_b_1")
local vi = area:index(locx, starty+i -1, locz)
data[vi] = minetest.get_content_id("doors:door_wood_t_1")
...
Code: Select all
local param2 = vm:get_param2_data()
...
local rotation = minetest.dir_to_facedir({x=1,y=0,z=0})
local vi = area:index(locx, starty, locz)
data[vi] = minetest.get_content_id("doors:door_wood_b_1")
param2[vi] = rotation
vi = area:index(locx, starty+ i - 1, locz)
data[vi] = minetest.get_content_id("doors:door_wood_t_1")
param2[vi] = rotation
...
vm:set_param2_data(param2)
Code: Select all
-- local rotation = minetest.dir_to_facedir({x=1,y=0,z=0}) --sign facing up
-- local rotation = minetest.dir_to_facedir({x=0,y=1,z=0}) -- same result as default sign floating facing down
-- local rotation = minetest.dir_to_facedir({x=0,y=0,z=1}) -- same result as default
-- local rotation = minetest.dir_to_facedir({x=-1,y=0,z=0}) -- sign facing east
-- local rotation = minetest.dir_to_facedir({x=0,y=0,z=-1}) -- sign facing west
local rotation = minetest.dir_to_facedir({x=0,y=-1,z=0})-- same result as default
Code: Select all
paramtype2 == "wallmounted"
^ The rotation of the node is stored in param2. You can make this value
by using minetest.dir_to_wallmounted().
paramtype2 == "facedir"
^ The rotation of the node is stored in param2. Furnaces and chests are
rotated this way. Can be made by using minetest.dir_to_facedir().
Values range 0 - 23
facedir modulo 4 = axisdir
0 = y+ 1 = z+ 2 = z- 3 = x+ 4 = x- 5 = y-
facedir's two less significant bits are rotation around the axis
Users browsing this forum: No registered users and 17 guests