WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 04-09-2009, 06:33 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
This code loops three times
Code:
object = [1, 0, 0] #1 means duck, 0 means ball
#Create an array of timer action
myTimerAction = []
for x in range(3):
	if (x == 0) : 
		myTimerAction.append(vizact.ontimer2(0, 1, donothing))
		path[object[0]].play()
	else: 
		wait = time_to_go[x] - time_to_go[0]
		myTimerAction.append(vizact.ontimer2(wait, 1, path[object[x]].play))
The first time the duck's animation path is played. The second time a timer object is created that will repeat one time, so the ball's path will be played twice and the third time another timer object is created that will repeat one time, and the ball's path should be played two more times for a total of four times. I think the reason you see the ball move around three times has something to do with your reset code.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
array problem mrvr Vizard 8 03-10-2014 10:20 PM
Sound Looping Problem JMOwens Vizard 4 09-29-2010 10:42 PM
Timer speed Jerry Vizard 1 12-08-2006 12:01 PM
problem with female animations vmonkey Vizard 1 10-07-2005 11:36 AM
Weird lagging/choppiness when avatars perform actions vjonshih Vizard 8 11-30-2004 05:08 PM


All times are GMT -7. The time now is 08:35 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC