You can also make each side of the cube it's own limb and use limb commands to recolor/retexture the desired limb/side. Here is some code I posted a long while ago that may help.
`******************************************************************************
`This code works by making a mesh out of the cube, making a memblock out of the
`mesh, and breaking it up into a memblock for each side of the cube, making
`meshs out of those memblocks, making a new object out of the first mesh, and
`making limbs to add to the new object as you can only texture individual limbs
`in DBP. It also cleans up when something is no longer needed to save memory.
`******************************************************************************
`variables to save fvf info
FVFFORM as dword
VERTBYTE as dword
NumbVert as dword
`display setup
sync on : sync rate 0
autocam off
position camera 0, 0, -120
`load 6 images
load image "grass2.bmp", 1
load image "BathBlue.bmp", 2
load image "CarpetTan.bmp", 3
load image "ceil_m_02.BMP", 4
load image "FlatBrickX.bmp", 5
load image "floor_m_15.BMP", 6
`make a cube
make object cube 1, 64
`make a mesh from cube so you can make a memblock
make mesh from object 1, 1
`delete the cube as it is no longer needed
delete object 1
`make a memblock from mesh to store the cubes data
`I will explain how to read and write the info below
make memblock from mesh 1, 1
`delete mesh as it is no longer needed
delete mesh 1
`*****************************************************************************
`get cube fvf format info
`the info is stored as follows for DBP made objects FVF 274 is the DBP default
`First Dword = FVF Format (which tells you how to read the rest, we'll use 274)
`Second Dword = The size in bytes of each vert's data
`Third Dword = Number of verts in the object
`after this you have to do a cycle for 1 to number of verts and read data over
`and over in this order until all verts are done:
`for i = 1 to numberVerts
` float = vert x position
` float = vert y position
` float = vert z position
` float = vert x normal
` float = vert y normal
` float = vert z normal
` float = vert u texture data
` float = vert v texture data
`next i
`*****************************************************************************
`*****************************************************************************
`actually read the memblock data as described above and break it up into
`6 memblocks to make the sides with
`store first 3 dwords mentioned above to variables to be used for the other
`memblocks
FVFFORM = memblock dword(1,0)
VertByte = memblock dword(1,4)
NumbVert = memblock dword(1,8)
`set a few placeholders
`original object memblock data's position placeholder to read
`start reading at position 12 as 0-11 are taken up byt the first
`3 dwords
a = 12
`current new vert number to write data for
b = 1
`current new memblock number to write to
c = 2
`new memblock data's position placeholder to write
`start writing at position 12 for each side as 0-11 are taken up byt the first
`3 dwords
d = 12
`make the first memblock for the front side
`the size is calculated as (the size of one verts byte data * 6 verts) + 12
`as the first 3 dwords are 12 bytes total
make memblock c, (12 + (VertByte*6))
`write memblock fvf format (use the same format as the original object)
write memblock dword c, 0, FVFFORM
`write vert byte size (use the same size as the original object)
write memblock dword c, 4, VertByte
`write number of verts (there is 2 polys per side and 3 verts
`per poly so we use (2*3) or 6)
write memblock dword c, 8, 6
`cycle through each original vert (a) of the cube and put them into groups of
`6 (c) for each side
`until all of the verts are rewritten cycle through the vert data
for i = 1 to NumbVert
`after 6 verts have been written move to the next side
`as b stores the side vert count
if b = 7
`inc to the next memblock for the next side
inc c, 1
`make memblock for the next side
make memblock c, (12 + (VertByte*6))
`write same fvf data as above
write memblock dword c, 0, FVFFORM
write memblock dword c, 4, VertByte
write memblock dword c, 8, 6
`reset side vert count
b = 1
`reset new side memblock position to 12 to start writing vert data
d = 12
endif
`write vert x pos for the current memblock position (d)
write memblock float c,d,memblock float(1,a)
`step up to the next position in the original memblock
inc a, 4
`step up to the next position in the current memblock
inc d, 4
`write vert y pos for the current memblock position (d)
write memblock float c,d,memblock float(1,a)
`step up to the next position in the original memblock
inc a, 4
`step up to the next position in the current memblock
inc d, 4
`write vert z pos for the current memblock position (d)
write memblock float c,d,memblock float(1,a)
`step up to the next position in the original memblock
inc a, 4
`step up to the next position in the current memblock
inc d, 4
`write vert x normal for the current memblock position (d)
write memblock float c,d,memblock float(1,a)
`step up to the next position in the original memblock
inc a, 4
`step up to the next position in the current memblock
inc d, 4
`write vert y normal for the current memblock position (d)
write memblock float c,d,memblock float(1,a)
`step up to the next position in the original memblock
inc a, 4
`step up to the next position in the current memblock
inc d, 4
`write vert z normal for the current memblock position (d)
write memblock float c,d,memblock float(1,a)
`step up to the next position in the original memblock
inc a, 4
`step up to the next position in the current memblock
inc d, 4
`write vert u data for the current memblock position (d)
write memblock float c,d,memblock float(1,a)
`step up to the next position in the original memblock
inc a, 4
`step up to the next position in the current memblock
inc d, 4
`write vert v data for the current memblock position (d)
write memblock float c,d,memblock float(1,a)
`step up to the next position in the original memblock
inc a, 4
`step up to the next position in the current memblock
inc d, 4
`current new vert number to write data for
inc b, 1
next i
`remove original object's memblock
delete memblock 1
`*****************************************************************************
`make meshs from your newly created memblocks
`*****************************************************************************
for i = 2 to 7
`make meshs to make limbs from
make mesh from memblock i, i
`delete memblock as it is no longer needed
delete memblock i
next i
`*****************************************************************************
`make the first object (the front side for limb 0)
`and texture with image 1
`*****************************************************************************
make object 1, 2, 1
`delete mesh as it is no longer needed
delete mesh 2
`*****************************************************************************
`add 5 limbs from created meshs and texture
`sides created in this order:
`front(already done),back,top,bottom,right,left
`*****************************************************************************
for i = 3 to 7
`add limbs (other sides to the front side to make a cube
add limb 1, i-2, i
`texture the sides
texture limb 1, i-2, i-1
`delete the meshs
delete mesh i
next i
`*****************************************************************************
`display results
do
`sort of wabble rotate so you can see all sides
rotate object 1, wrapvalue(object angle x(1) + .1), wrapvalue(object angle y(1) + .05), 0
sync
loop
end
[edit] This is the longer version of the code they had me post to make it easier to understand. It can be shortened a great bit I believe if need be.