WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 04-20-2016, 02:39 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You could use a viztask function to wait for one event and then another before an action is triggered. The following code shows this with key events:

Code:
import viz
import viztask
import vizact

viz.go()

piazza = viz.addChild('piazza.osgb')

avatar = viz.addAvatar('vcc_male2.cfg',pos=[-3,0,5])
avatar.state(1)
walk = vizact.walkTo([3,0,5])

viz.move([0,0,-4])

def triggerAction():
	
	yield viztask.waitKeyDown('a')
	yield viztask.waitKeyDown('c')
	avatar.runAction(walk)
	
viztask.schedule( triggerAction() )
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
help with triggering an action jelly Vizard 0 04-08-2016 08:44 AM
Walking action of avatars SivaKartheek Vizard 3 01-08-2016 10:17 AM
walking action of avatars SivaKartheek Vizard 1 12-14-2015 11:58 PM
vizact move action andreionutz Vizard 13 11-19-2014 03:54 AM
adding more than 1 action for avatar animation slider control yak Vizard 0 07-21-2009 12:22 PM


All times are GMT -7. The time now is 12:16 PM.


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