WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 07-26-2011, 07:04 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You could remove the current state and then add it back just before the actions are done with a timer. That way the avatar won't revert to any state between actions:
Code:
import viz
import vizact

viz.go()

avatar = viz.addAvatar('vcc_female.cfg',pos=[0,0,5],euler=[180,0,0])
avatar.state(1)

def animateAvatar():
	
	#remove current state
	avatar.state(-1)
	
	#add a series of actions
	avatar.addAction(vizact.animation(4))
	avatar.addAction(vizact.animation(5))
	avatar.addAction(vizact.animation(6))
	
	actionsDuration = avatar.getDuration(4) + avatar.getDuration(5) + avatar.getDuration(6) - 0.1
	
	#set state before animations finish
	vizact.ontimer2(actionsDuration,0,avatar.state,1)

vizact.onkeydown(' ',animateAvatar)

Please create a new thread for the linking question and post some example code that replicates the problem for you.
Reply With Quote
 

Tags
animation, avatar, link, linking

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
Animations and locked bones Enlil Vizard 1 06-17-2010 04:45 PM
Smooth transitions back to animations when unlocking bones Enlil Vizard 3 04-01-2009 08:24 PM
Linking problems with Live Character Frank Verberne Vizard 5 06-04-2008 12:42 PM
Could not find plugin to load objects... halley Vizard 1 05-30-2006 12:01 PM
Linking avatar 'bones' to a position tracker. zachhendershot Vizard 3 11-19-2003 10:26 PM


All times are GMT -7. The time now is 02:48 PM.


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