You could randomly select a scene using the random module to generate a random integer and then set the scene to that number.
Code:
import viz
import random
viz.go()
#add three objects to three different scenes
duck = viz.add('duck.wrl',scene = 1)
wheelbarrow = viz.add('wheelbarrow.ive',scene=2)
wheelbarrow = viz.add('ball.wrl',scene=3)
viz.MainView.move(0,-1,-7)
def changeScene():
num = random.randint(1,3)
viz.scene(num)
vizact.ontimer(2, changeScene)
To get an objects position use
Code:
object.getPosition()
That will return a list with x,y,z position of the object.