WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 09-23-2005, 09:31 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

Yes, you can play to actions at the same time. When you add actions to objects you can specify which action pool to add it to. Action pools allow you to run multiple actions on objects in parallel. Please have a look in the documentation under the Actions section.

For example, lets say you wanted to perform a speak action and animation action in parallel:
Code:
#Create an action to play animation 3
anim = vizact.animation(3)

#Create an action to speak 'words.wav'
words = vizact.speak('words.wav')

#Play both actions on the avatar simultaneously
avatar.add(anim,1)
avatar.add(words,2)
To stop a current action from running you would do the following:
Code:
avatar.clear(viz.CURRENT_ACTION,pool)
This will stop any current actions being performed on the avatar on the specified pool. Currently, the speak action will not stop the sound from being played when it is cleared, so you will have to stop it manually:
Code:
viz.playsound('words.wav',viz.STOP)
On a side note, I had some free time and was able to create a version of the speak action which will keep the mouth movement in sync with the audio file. I tried it on a wav that was 5 minutes long and it seemed to work fine. I will include it in the next update to Vizard. If you wanted, I could supply you some code to get it working in the current version.
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


All times are GMT -7. The time now is 08:24 PM.


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