Re: [Audiogames-reflector] creating an instance of an instance of a class with python

2013-10-02 Thread AudioGames.net Forum — Off-topic room: camlorn
Re: creating an instance of an instance of a class with python Right, which is another problem entirely.  You don't need to copy a mob, you need to be able to spawn a mob with some given properties, possibly with a unique name, possibly with some random variation.  Solution, forget about deep co

Re: [Audiogames-reflector] creating an instance of an instance of a class with python

2013-10-02 Thread AudioGames.net Forum — Off-topic room: stewie
Re: creating an instance of an instance of a class with python Basically a list of mobs are spawned for combat. I have prototypes for each, however adding them to a list simply would point to the prototype class instance.URL: http://forum.audiogames.net/viewtopic.php?pid=150379#p150379

Re: [Audiogames-reflector] creating an instance of an instance of a class with python

2013-10-02 Thread AudioGames.net Forum — Off-topic room: camlorn
Re: creating an instance of an instance of a class with python Look at copy module: http://docs.python.org/2/library/copy.htmlBut, are you absolutely sure this is what you want?  If you provide more info, there might be a better solution.  Given that we are talking about mobs, there almost certa

[Audiogames-reflector] creating an instance of an instance of a class with python

2013-10-02 Thread AudioGames.net Forum — Off-topic room: stewie
creating an instance of an instance of a class with python I've created a class similar to:class mob: def __init__(self,params):  #a lot of stuffthena_mob_that_will_be_spawned=mob(params)thenenemies.append(a_mob_that_will_be_spawned)just adds the pointer to the created instance to the list of en