Help with Classes and Objects


Well-known member
Jan 3, 2008
Ontario, Canada
Programming Experience
I think I'm still a little confused about Classes and Objects.

I am creating a small game, to teach myself programming. It's kind of like a Pokemon card game, with different characters, monsters etc.

I want to use a HERO Class to store all the info on the players and a MONSTER class to store all info on Monsters. But... I am having all kinds of trouble with the idea of allowing these objects be present no matter what form or module I am dealing with.

So if I have an Object named "Superman" and it's got these kinds of properties : = "Superman" ="100"
superman.speed ="100"
superman.inventory1 ="backpack"

and a monster might look like this = "goblin" ="22"
goblin.speed ="50"
goblin.inventory1 ="axe"

I guess my question is.... how can I create the SUPERMAN object, from the HERO CLASS so that I can "publicly" use it no matter what FORM or MODULE I am in?

Right now, it seems I can only Create and Use the Object in 1 place at a time.

I'm confused at to how this is supposed to work, please help!!
Top Bottom