View Single Post
  #7  
Old 04-09-2013, 02:41 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,448
If you're waiting for either the walk action to finish or the keypress to occur you should use the viztask.waitAny command. Then if the event was a keypress you can leave the task using the return command:
Code:
d = yield viztask.waitAny([waitSpaceBar,waitAction])
condition = d.condition
if condition == waitSpaceBar:
	avatar.clearActions()
	return
Reply With Quote