Want to create a group with 10 images. The images should later on the screen not overlap. I try to check that with sprite.spritecollide. somewhere / somehow images disappear. probably using Spritecollide incorrectly.
ii = -1
while ii < 10:
ii+=1
img = pygame.image.load(f"Bilder/Gegenstaende/geg{ii}.png")
img = pygame.transform.scale(img,(100,100))
m = Landschaft(img)
zzz = 0
hits = pygame.sprite.spritecollide(m,land,True)
if len(hits) >=1:
for hit_sprite in hits:
zzz +=1
ii = ii -zzz
else:
land.add(m)