I have started a new thread since the last one got so long, i tried to create a
simplified code for collision which i could use for each block and the
character, However i come up with a error for the pMouse, maybe as it is a
cloned character the command would be set out different?

For those who havent seen the previous post:

i have created a 3d scene and cloned a character in from the cast, this
character is able to navigate around the screen, however im attempting to make
it so when it walks into the blocks they will be solid.

to clone the model i used:

pMouse = pMember.cloneModelFromCastmember("mouse", "mouse", member("mouse"))
pMouse.transform.scale = vector(0.2,0.2,0.2)
pMouse.transform.rotation = vector(0,90,0)
pMouse.transform.position.y = -10
pMouse.transform.position.x = 80
pMouse.transform.position.z = 40

then to detect collision i tried the following:

-- add collision modifier to the "block"
pMember.model("block").addmodifier(#collision)

-- set bounding geometry for collision detection to bounding box of model
pMember.model("block").collision.mode = #box

-- resolve collision for block
pMember.model("block").collision.resolve = TRUE

-- i get the error on the following line

-- add collision modifier to the character
pMouse.addmodifier(#collision)

-- set bounding geometry for collision detection to bounding box of model
pMouse.collision.mode = #mesh

-- resolve collision for character
pMouse.collision.resolve = TRUE

end