WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-24-2013, 10:52 PM
atalantis atalantis is offline
Member
 
Join Date: Feb 2013
Posts: 1
Problems Ending Animation

Hi,

So I'm running code so that an avatar runs a series of random animations one after another until the user signals the animations to stop with a key press. The problem comes up after the user has signaled the animations to stop. It stops the current animation, and then starts up a new one. This is even after I have told it to clearActions(). Perhaps I don't have a good grasp on how the action list works with the viz.FOREVER parameter.

Code:
teacher = viz.addAvatar('avatars/teacher/teacher1/teacher.cfg')
teacher.setPosition([0,0,0])
teacher.setEuler([180,0,0])
teacher.state(7)

def Start_Gestures():
	random_gesture = vizact.animation(vizact.randint(1,5), 3.0)
	teacher.runAction(vizact.sequence(random_gesture, viz.FOREVER))
	
def End_Gestures():
	teacher.clearActions()
	teacher.state(7)

vizact.onkeydown('s', Start_Gestures)
vizact.onkeydown('e', End_Gestures)
Any thoughts?

Thanks in advance!
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
Clarification on CAL3D Avatar Animation in Vizard shivanangel Vizard 2 11-22-2010 07:16 AM
Problems with interaction of vizact.turn and animation path Enlil Vizard 3 11-24-2008 04:23 PM
Animation Tracks.... k_iwan Vizard 2 03-26-2007 05:52 PM
Jumpy animation Elizabeth S Vizard 1 11-08-2006 02:11 PM
avatar animation problems jrodman Vizard 1 01-18-2006 09:12 AM


All times are GMT -7. The time now is 06:30 AM.


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