[Help needed]

Posted:
Fri Jun 21, 2013 20:46
by kutkuhunter98
could anyone write me a code for a nodebox that will be super flat. It is for a really cool mod I am making. Thanks.

Posted:
Fri Jun 21, 2013 21:29
by sfan5
Like this?

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
drawtype="nodebox",
paramtype = "light",
node_box = {
type = "fixed",
fixed = {
{-0.500000,-0.500000,-0.500000,0.500000,-0.450000,0.500000}, --NodeBox 1
}
}

Posted:
Fri Jun 21, 2013 21:33
by kutkuhunter98
Yes, thank you. now how do you add different textures to a nodebox?

Posted:
Fri Jun 21, 2013 21:39
by Topywo
fixed = {-0.5,
-0.001, -0.5, 0.5,
0.001, 0.5}
the -0.001 and 0.001 are the Y's.
You can make the flat less flat by enlarging the numbers example:
fixed = {-0.5,
-0.01, -0.5, 0.5,
0.01, 0.5}
or you can put it on the bottom:
fixed = {-0.5,
-0.5, -0.5, 0.5,
-0.498, 0.5}
or top:
fixed = {-0.5,
0.498, -0.5, 0.5,
0.5, 0.5}
You can copy the code from a mod with nodeboxes, like VanessaE's homedecor, and replace (mod)names with the names of your mod and change the numbers behind fixed with one of the examples. Best way is to just try out different formats.
A helpful topic:
http://forum.minetest.net/viewtopic.php?id=2333Edit: yeah, never mind too :-)

Posted:
Sat Jun 22, 2013 05:46
by kutkuhunter98
how do I get this to turn to attach to the wall when I look at the wall. when I look at the wall and place this, it is sideways and coming off the wall
minetest.register_node("mod:wall_red", {
tiles = {"mod_wall_red.png"},
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
drawtype="nodebox",
paramtype = "light",
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {
{-0.50, - 0.50, -0.50, -0.40, 0.50, 0.50}, --NodeBox 2
}
}
})

Posted:
Sat Jun 22, 2013 09:49
by Dan Duncombe
Try using drawtype = "signlike", and paramtype2 = "wallmounted",