[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Re: HELP PLEASE: sprite collision - object not iterable error

Thanks for your answer, however, I got an error when 
I replaced Monster with MGroup 
and Player with PGroup. Error was - 

Traceback (most recent call last):
  File "C:\Users . . . \Python\Games\LightSlayer\LightSlayer.py", 
line 95, in <module>
    if pygame.sprite.spritecollide(PGroup, MGroup, False):
  File "C:\Python25\lib\site-packages\pygame\sprite.py", line 1337, in 
    spritecollide = sprite.rect.colliderect
AttributeError: 'Group' object has no attribute 'rect'

I guess I'm misusing the PGroup/MGroup? Any advice? Thanks in advance.