I am fairly new to PyGame and I am creating a space shooter game. Part of this game are powerups and when a specific powerup is picked up by the player, I want the player not to be able to shoot for 3 seconds. Shooting is done by mouse click.
I can pick up the powerup, I know what powerup the player last picked up, but I am struggling with the event. How I am thinking of implementing is:
- Can't Shoot power up is picked up -> that's done
- Block mouse buttons
- Wait 3 seconds, while the rest of the game is still running
- Unblock mouse buttons.
I am aware that Python functions, such as wait, won't help.
Any ideas/suggestions? Thanks
. This condition is true only once, when the powerup is picked.
– Adrian Daniel Culea Feb 05 '16 at 22:43