View Single Post
  #2  
Old 06-02-2008, 07:56 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Sure, just yield the mouse down condition multiple time. For example:
Code:
def BallFlight():
	
	#Wait for left mouse button to be pressed twice
	yield viztask.waitMouseDown(viz.MOUSEBUTTON_LEFT)
	yield viztask.waitMouseDown(viz.MOUSEBUTTON_LEFT)
If the number of mouse click is some variable amount, then you can use the following code:
Code:
NUM_CLICKS = 2
def BallFlight():
	
	#Wait for left mouse button to be pressed twice
	for x in range(NUM_CLICKS):
		yield viztask.waitMouseDown(viz.MOUSEBUTTON_LEFT)
Reply With Quote