View Single Post
  #6  
Old 02-13-2006, 01:02 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

That's correct. If you want the avatar to walk endlessly then you would place the walk action inside a sequence and have it repeat forever. Here is what the code would look like:
Code:
#Create a walk action that will randomly select a location between (-5,-5) and (5,5)
WalkForever = vizact.sequence(vizact.walkto(vizact.randfloat(-5,5),0,vizact.randfloat(-5,5)),viz.FOREVER)

#Add walk action to avatar
avatar.add(WalkForever)
Reply With Quote