if the if statement is true i am trying to emit from the emitters particles rand 1 to 5 frames.
CODE
myCurrentTime = mc.currentTime( query=True )
myStartTime = mc.playbackOptions(query=True, minTime=True)
myEndTime = mc.playbackOptions(query=True, maxTime=True)
amp = 1 # sc
xpos=[]
zpos=[]
wavePP = []
waveHeightPP = .53 #sc
waveEmitter =[]
for ctr in xrange(myEndTime-1):
for i in xrange(self.waveRes):
wavePP = (mc.pointPosition(self.wName[0]+".vtx"+"["+str(i)+"]",w=True))
for x in range(1):
xpos.append(wavePP[0])
zpos.append(wavePP[2])
myrand = random.random()
myrand2 = random.random()
waveGen = amp * math.degrees(math.sin(i*myrand))/100 #sc
#print waveGen
mc.xform(self.wName[0]+".vtx"+"["+str(i)+"]",t=(xpos[i],waveGen,zpos[i])) #sc
mc.setAttr("sprayEmitter"+str(i)+".translateX",xpos[i])
mc.setAttr("sprayEmitter"+str(i)+".translateY",waveGen)
mc.setAttr("sprayEmitter"+str(i)+".translateZ",zpos[i])
if (waveGen>waveHeightPP) and (myrand2 > .95): #also want each emitter to emit rand 1 to 5 frames if condition is met
getCurrentTime = myCurrentTime
mc.setAttr("sprayEmitter"+str(i)+".rate",300) #sc
mc.setAttr("sprayEmitter"+str(i)+".speed",3) #sc
else:
mc.setAttr("sprayEmitter"+str(i)+".rate",0)
myCurrentTime= mc.currentTime(myCurrentTime+1)