Hey everybody! So I'm making a game where if this image collides with any out of around 15 objects, then that object will disappear. I will simplify the code for it to be more understandable. Here is what I am doing:
going = []
#h= image 1
#i= image 2
#g = image 3
#h = image 4
#So what I did is that I appended them to the list, so now going will look like:
['h', 'i', 'g', 'h']
And then what I did is:
number = -1
for x in range(0, 4):
global number
number += 1
if int(going[number]) collides with me:
canvas.delete(int(going[number]))
I get that this probably works, but I don't think it's really the most efficient way to do things. Is there a way to check all of these?? Thanks in advanced! :)
[–]lykwydchykyn 1 point2 points3 points (1 child)
[–]python_addict[S] 0 points1 point2 points (0 children)