View Single Post
  #1  
Old 10-13-2005, 09:10 AM
Amit Amit is offline
Member
 
Join Date: Aug 2005
Posts: 9
Avatar Duck Animations

I want to translate a duck (an inbuilt avatar) from one position (say A) to another position(say B). At position A, the duck should not have any movements, that is, it is stationary (code: duck.state(0)). when pressing left click, it should move towards position B, but with state(1).
{code:
duckMove=vizact.sequence(vizact.goto(x,y,z))
duck.add(duckMove)
duck.state(1)
}

once we reach position B, the duck should stop moving and should be in state(0).

{code:
def actionEnd(obj,action):
if action==duckMove:
duck.state(0)

viz.callback(viz.ACTION_END_EVENT,actionEnd)
}

but this doesn't seem to work, can you please suggest something, by which I can carry out the specified task.

-Amit
Reply With Quote