WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
Old 04-17-2006, 11:13 AM
betancourtb82 betancourtb82 is offline
Join Date: Jan 2006
Posts: 103
Avatar Attributes

I'm trying to create an array of avatars, each with a different set of attributes (body, face, name, etc.). I'm thinking of developing a class that has these "attributes" as shown below:
class Person(object): = name
	self.enemy = enemy
Using these attributes, I'm thinking of putting each "person" into an array, based on their name. Can I have some pointers on how to do this. I'm kind of stuck.
Reply With Quote
Old 04-17-2006, 01:23 PM
farshizzo farshizzo is offline
WorldViz Team Member
Join Date: Mar 2003
Posts: 2,849

Take a look at the following thread. It describes how to creat your own class that inherits from an avatar:

Also, if you want to access avatars by name then you should create a dictionary instead of a list. Here is an example:
name_dict = {}
name_dict['Bob'] = viz.add('male.cfg')
name_dict['Jane'] = viz.add('female.cfg')

Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 02:43 PM.

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