Так, как юзать Handle, я понял, а с командой Object что делать? Что-то не получается. По-моему, я с pointer-ом намудрил...
Function CreateCubes()
For y = 1 To 10
For x = 1 To 10
cube.T_cubes = New T_cubes
cube\ent = CreateCube()
cube\x = x * 3 - 15
cube\y = y * 3 - 15
cube\z = 20
map(x,y) = Handle(cube.T_cubes)
If x = 1 And y = 1
n = Rand(1,2)
Select n
Case 1
cube\col = "red" : EntityColor cube\ent,255,0,0
Case 2
cube\col = "green" : EntityColor cube\ent,0,255,0
End Select
Else
pointer.T_cubes = Object.T_cubes(map(x - 1,y))
If pointer\col = "red"
cube\col = "green"
EntityColor cube\ent,0,255,0
ElseIf pointer\col = "green"
cube\col = "red"
EntityColor cube\ent,255,0,0
EndIf
EndIf
PositionEntity cube\ent,x * 3 - 15,y * 3 - 15,20
Next
Next
End Function