Arrays of entities

Blitz3D Forums/Blitz3D Beginners Area/Arrays of entities

Yes, but you need to define the array like this:
Dim actors.cuboid(20)


Just like how if you want an array of floats, you put the # after the name then the number of elements. You also have to create the objects before you can modify them.

For n=0 to 19
  actors(n) = new cuboid
  actors(n)\x=rnd(-10,10)
  actors(n)\y=rnd(-10,10)
  actors(n)\z=rnd(-10,10)
Next