CAN NOT MOVE OBJECT CREATED BY STRUCT

I have an idea , i want create a plugin . I try to create object in struct but i can not move it . Can you help me ? Sorry my bad enligh

struct BoxStruct
(
-- Fields
w,l,h,

-- initialize Function
fn _init = (
if w == undefined then w = 10
if l == undefined then l = 10
if h == undefined then h = 10
Box width:w length:l height:h
),

-- Do initialize
init = _init()
)

BoxObj2 = BoxStruct()

--PROBLEM HERE I CAN NOT MOVE IT

move BoxObj2 [19.2515,0,0]

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
alexnguyen's picture

thank

you save my day :)

fajar's picture

youre moving the struct not

youre moving the struct not the object....

struct BoxStruct
(
-- Fields
w,l,h,
 
-- initialize Function
fn _init =
	(
if w == undefined then w = 10
if l == undefined then l = 10
if h == undefined then h = 10
Box width:w length:l height:h
)
 
-- Do initialize
-- init = _init()
)
 
BoxObj2 = BoxStruct()
myBox = BoxObj2._init()
 
--PROBLEM HERE I CAN NOT MOVE IT
 
 move myBox [19.2515,0,0]

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.