WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:03 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC