View Single Post
  #2  
Old 07-15-2016, 04:39 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
The viz.tick command will still update when the timers are paused. You can check the viz.tick value from a function that's registered with the vizact.onupdate command:

Code:
import viz
import vizact
import vizinfo

viz.go()

info = vizinfo.InfoPanel('paused for 5 seconds')

viz.pause()

def updateFunction():
	print 'frame time',viz.getFrameTime()
	print 'viz.tick',viz.tick()
	if viz.tick() > 5.0:
		viz.play()
		info.setText('playing')
		
vizact.onupdate(0,updateFunction)
Reply With Quote