WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-15-2005, 09:40 AM
Johannes Johannes is offline
Member
 
Join Date: Jan 2005
Posts: 143
Delay without viz.waittime?

Hi,
how do I put a delay inside my skript?
without viz.waittime which stalls the whole scene.

I want a projector screen to move down bevor graphs get put on it.

If I do:

screenWall.goto(0,-2.2,0, .8)
putGraphOnScreenWall()

the graphs are on the ScreenWall before it is down...

Thank you,
Johannes
Reply With Quote
  #2  
Old 03-15-2005, 11:11 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
You will need to use a callback for this. The following callback is called every time a built-in animation finishes. Check when the screen has finished moving then call your function:
Code:
def onactionend(object,action,pool):
	if object == screenWall and action == viz.MOVE:
		putGraphOnScreenWall()
		
viz.callback(viz.ACTION_END_EVENT,onactionend)
Reply With Quote
  #3  
Old 03-16-2005, 08:59 AM
Johannes Johannes is offline
Member
 
Join Date: Jan 2005
Posts: 143
Thank you.
It works 90 % fine.
When the user klicks on the graphOnWall Checkbox again, before the projection-surface is completely up, the graphs get put in the air.

I guess that is because while the projection-Surface is moved up and the user clicks the checkbox the movement is stopped => ACTION_END_EVENT is triggered, checkbox is ON and so the graphs get put in the air.

To solve this I would need to check, if the ACTION_END_EVENT occured after the surface moved down vs. up.

Sorry, solved it while writing this:
if checkboxWall.get()==1 and screenWall.get(viz.POSITION)[1]==0:
Reply With Quote
Reply

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


All times are GMT -7. The time now is 07:28 AM.


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