I think this may be the clue:
http://www.pygame.org/docs/ref/sprite.html#Group.sprites
I think in Python2.6 and later, it will grab an Iterator, rather than a
list... I'm not sure. Try doing lst = enemiesGroup.sprites(), then
random.choice(lst)
On Wed, Aug 26, 2009 at 6:54 PM, Yanom Mobis wrote
so, here is my main function:
def main()
enemiesGroup.add(EnemyThingie("enemy.png", random.randint(-100,
100),random.randint(-100, 100), 4, 4)) #this error gets raised if the game
isn't started with one enemy
print enemiesGroup.sprites()
while 1:
clock.tick(10)
fo
Jake b wrote:
> Hi
>
> I'm compiling the code (my first prg with gcc), and doesn't find SDL.h.
> I have done a find on SDL (find -name "SDL.h"), without success. Where
> and how can I find this file ? Do I have to install SDL ? (I'm assuming
> Python is using it and its there...)
Hi
> I'm compiling the code (my first prg with gcc), and doesn't find SDL.h.
> I have done a find on SDL (find -name "SDL.h"), without success. Where
> and how can I find this file ? Do I have to install SDL ? (I'm assuming
> Python is using it and its there...)
To search you can try: [ search