You have some small errors in your code that is messing things up.
1) Creating classes must be done in an init python block, not just a python block
2) To makes sure your classes participate properly in save and rollback, make sure it inherits from object
3) variables should be declared outside of any block (including a python block) using default if you plan on changing/updating those variables, define if you don't.
Make a fresh project and put this code in it. I've just tested it, it works:
Code: Select all
define e = Character("Eileen")
init python:
class Item(object):
def __init__(self, name, cat, hair):
self.name = name
self.cat = cat
self.hair = hair
default japanese = Item('japan', 'neko', 'pigtails')
default french = Item('france', 'chat', 'short')
default punk = Item('post-apocalypse', 'Marge', 'mohawk')
label start:
e "Thanks for testing the game!"
e "[japanese.cat]."
return
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe:
http://lemmasoft.renai.us/forums/viewto ... 51&t=21978