durf
03-03-2009, 09:36 AM
Hello,
I have made a 2d array of pillars. I am trying to make all of these pillars drop to a certain plain. I am just a little confused about what I need to do. Below is the code that pertains to my nested for loops which create the pillars. I have looked into viz.gravity() and figured that is the best route. Just not sure where or really how to impliment this.
columns = [-20, -10, 0, 10, 20]
rows = [0, 6, 12, 18]
pillars = []
for x in columns: #creates an array of pillars
for y in rows:
pillar = OrginalPillar.copy()
pillar.translate(0+x, 0, 0+y)
pillar.setScale(1,1,1)
pillar.visible(viz.OFF)
pillars.append(pillar)
number = 0
def showPillar():
globae number
pillars[number.visible(viz.ON)
number += 1
vizact.ontimer2(.5,len(pillars)-1,showPillar)
I have made a 2d array of pillars. I am trying to make all of these pillars drop to a certain plain. I am just a little confused about what I need to do. Below is the code that pertains to my nested for loops which create the pillars. I have looked into viz.gravity() and figured that is the best route. Just not sure where or really how to impliment this.
columns = [-20, -10, 0, 10, 20]
rows = [0, 6, 12, 18]
pillars = []
for x in columns: #creates an array of pillars
for y in rows:
pillar = OrginalPillar.copy()
pillar.translate(0+x, 0, 0+y)
pillar.setScale(1,1,1)
pillar.visible(viz.OFF)
pillars.append(pillar)
number = 0
def showPillar():
globae number
pillars[number.visible(viz.ON)
number += 1
vizact.ontimer2(.5,len(pillars)-1,showPillar)