WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rating: Thread Rating: 19 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #10  
Old 02-24-2006, 01:16 PM
betancourtb82 betancourtb82 is offline
Member
 
Join Date: Jan 2006
Posts: 103
I was wondering if you could help me out. I'm trying to add an animation where, if I click on an avatar, it falls to the ground and disappears. I got the falling part down, but I added the fadeReset sequence to try and delay the disappearing and it doesn't work out. Any ideas?
Code:
def onmousedown(button):
	if button == viz.MOUSEBUTTON_LEFT:
		node = viz.pick() #Get object that was clicked
		if node in avatars: #Check if object is one of the avatars
			node.clear(viz.ALL)
			node.clear(viz.CURRENT_ACTION)
			node.execute(7) #Execute the "shot" animation
			#Create action to wait for the animation duration then freeeze the avatar
			WaitThenFreeze = vizact.sequence( vizact.waittime(node.getduration(7)-.139), vizact.speed_node(0))
			fadeReset = vizact.sequence(vizact.waittime(5),node.remove())
			#vizact.sequence(vizact.waittime(2),avatars.remove(male),1)			
			node.add(WaitThenFreeze) #Add the action to the avatar
			node.add(fadeReset)
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 03:01 AM.


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