I'm trying to tell when a sprite, which must be part of a particular group (pygame.sprite.Group()
), is clicked on. Currently I've tried creating a sprite which is just the mouses position and totally invisible, adding it to its own group, and using this code:
clickedList = pygame.sprite.spritecollide(guess1, mice, False)
where guess1
is the sprite getting clicked on and mice
is the group containing the sprite that has the position of the mouse.
When I try this, I am told that "Group has no attribute rect". Where do I go from here?