Use a boolean => invisibility = false
Set the boolean to true once the player collides with the star power-up.
Then in your if-else statements or loops, state that if invisibility == true, no collisions will take place.
I have a star power-up in my game, and when it collides with the player I want an 'invincibility timer' that starts up. This timer would basically turn off all collisions for 5 seconds, and after the 5 seconds are over, they would turn on again. Is there a better way to accomplish this, and if not, how can I write this in pygame?
How can I make a invincibility timer in pygame?