0

I am making a game in pygame and I ran into a little issue.

this code:

    if balloon_rect.collidepoint(mouse_pos) and event.type == pg.MOUSEBUTTONDOWN:
        balloon_rect.x = 200
        balloon_rect.y = 480

doesn't work. It should detect where the mouse is and if the position is the same as the position of the balloon and a mouse button is clicked, the balloon should go back to the coordinates x200 and y480. In some way this doesn't happen, I hope you can help me.

Best wishes, Onno

0 Answers0