Thread: Faces
View Single Post
  #1  
Old 01-19-2006, 11:43 AM
betancourtb82 betancourtb82 is offline
Member
 
Join Date: Jan 2006
Posts: 103
Exclamation Faces

I'm a bit new to Vizard and Python in general. I'm trying to make a program that would allow the user to select between different faces. Here is part of the code:
import viz
viz.go(viz.HMD)

#Add a male avatar, idling and facing the viewer.
male = viz.add('Male.cfg')
#define position of avatar, x is horizontal, y is vertical, z is depth

male.translate(0,0,1)
male.rotate(0,1,0,180)
male.face('stan.jpg')

#define a choice variable
choice = viz.input('Prompt for action')
if choice > 12
print 'bad choice'
#1 = neutral 2 = walk 3 = walk180
#4 = jog 5 = wave 6 = shout
#7 = shot 8 = laying still 9 = sit throw
#10 = sit down 11 = stand up 12 = loiter
male.state(choice)

I get errors on the if statement and on the male.state(choice)

Also, i am not able to access stan.jpg. The error is fail to load file. Please help
Reply With Quote