View Single Post
  #2  
Old 10-17-2008, 03:18 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
If you are storing all these cubes in a list, then you can use the random.choice() function to get a random cube from the list. Example code:
Code:
import random

# List containing all cube objects
cubeList = [...]

# Select a random cube from the list
randomCube = random.choice(cubeList)
Now you can have the cube loom at the user.
Reply With Quote