I would like to create about 100 Cubes, and let them move randomly.
but I am getting 2 problems:
-
how to create and initial objects when game start, and destroyed them when game end?
-
can I use a for loop on these objects? I found when I create a new Cube it will be auto named by Cube.002 Cube.003 … But when I use for loop with a variable i and get the name by [‘Cube.’+i] it should be Cube.1 Cube.2 …I have no ideas with the zeros.
English is not my native language, please tell me if I didn’t make the question clear.
Thanks very much!