Perhaps someone have an idea to fix my problem:
I make some experiments with the nodebox value.
I want make from two variables one:
My Example:
variable1 = {abcabc}
variable2 = {xyzxyz}
varibalenew = variable1 variable2
--> output of 'variablenew' should be -> {abcabc}{xyzxyz}
I have tryed all. It won't work =(
this is my code:
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
math.randomseed(os.time())
local detail = 16
local testnoc = {}
local testbox1 = {}
local testbox2 = {}
for i = 0, detail-1 do
hoehe = math.random (0,5)
testbox1[i+1]={-0.5, -0.5, (i/detail)-0.5, -0.5+(1/detail), hoehe*0.1, (i/detail)-0.5+(1/detail)}
hoehe = math.random (0,5)
testbox2[i+1]={-0.5+(1/detail), -0.5, (i/detail)-0.5, -0.5+(2*(1/detail)), hoehe*0.1, (i/detail)-0.5+(1/detail)}
end
local testbox = testbox1, testbox2
minetest.register_node("test:test_object2", {
description = "TEST OBJECT2",
drawtype = "nodebox",
tiles = {"default_desert_sand.png"},
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {-0.5,-0.5,-0.5,0.5,0.5,0.5},
},
node_box = {
type = "fixed",
fixed = testbox,
},
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=3,flammable=2},
})
Now it works without an error, but in the var 'testbox' is only the value of 'testbox1'.
Wat i'm doing wrong???