This command will add a specified memblock to an object.

ADD MEMBLOCK TO OBJECT memblock Number, Object Number
memblock Number

The memblock number Object Number Integer
The object number


This command does not return a value.


The memblock is stored inside the objects custom data feature, and remains with the object even if the object is saved and reloaded. This feature is ideal for exporting additional settings for the object such as scale, rotation or more exotic data such as sound or image data. See the memblock category for more features provided through the memblock system.

Example Code
input "(c)reate or (l)oad?";a$

if a$="c"

 make object sphere 1,100

 scale object 1,25,100,25

 make memblock 1,12

 write memblock dword 1,0,25

 write memblock dword 1,4,100

 write memblock dword 1,8,25

 add memblock to object 1,1


 if file exist(f$)=1 then delete file f$

 save object f$,1

 delete object 1


load object "scaledobject.dbo",1

get memblock from object 1,1

sx#=memblock dword(1,0)

sy#=memblock dword(1,4)

sz#=memblock dword(1,8)

scale object 1,sx#,sy#,sz#

delete memblock from object 1

wait key

Community content is available under CC-BY-SA unless otherwise noted.