![]()  | 
	
| 
		 
			 
			#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)
Thanks in advance!  | 
| 
		 
			 
			#2  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			atalantis, 
		
		
		
		
		
		
		
		
	
	as far as I know you cannot control avatar animations with the action library commands. Look for commands related to avatar animations. Examples are: <node3d:avatar>.setAnimationState, <node3d:avatar>.setAnimationSpeed, <node3d:avatar>.stopAnimation, etc. I hope this helps!  | 
| 
		 
			 
			#3  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			The default idle animation for the avatar is 1. It looks like you want animation 7 to be the idle animation. Use the following to change the idle animation: 
		
		
		
		
		
		
		
		
	
	Code: 
	teacher.idlepose(7)  | 
![]()  | 
	
	
		
  | 
	
		
  | 
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Clarification on CAL3D Avatar Animation in Vizard | shivanangel | Vizard | 2 | 11-22-2010 08:16 AM | 
| Problems with interaction of vizact.turn and animation path | Enlil | Vizard | 3 | 11-24-2008 05:23 PM | 
| Animation Tracks.... | k_iwan | Vizard | 2 | 03-26-2007 06:52 PM | 
| Jumpy animation | Elizabeth S | Vizard | 1 | 11-08-2006 03:11 PM | 
| avatar animation problems | jrodman | Vizard | 1 | 01-18-2006 10:12 AM |