Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Question about Pygame Timer in Python?

Please only answer this question if you have at least some experience in Python and/or OOP in Python.

Hello, I'm using Pygame and Livewires in Python to create a balloon pop type of game. The player has a launcher they move with the mouse, and presses the left mouse button to fire. I want to make it so that the every 25 clicks, the row of balloons moves down using the dy property. While I did get this to work successfully, I'm having a bit of a problem. I reference the dy property in the balloons constructor method through a global variable called SPEED. Under the launcher class, I have a simple if statement that says, if CLICKS (number of clicks recorded from 0-25) == 25, set SPEED to 1. This in turn, sets the dy value to 1, making the balloons move down at a even pace. However, I want them to stop after about 1-2 seconds. I've canvased the internet for literally the past 24 hours, and have looked through every python manual I own, and still cannot figure this out. I've also tried other sites like stackoverflow.com, but I don't think they're understand my bad explanations :) If someone could help me, I would very much appreciate it.

1 Answer

Relevance
  • ?
    Lv 5
    8 years ago
    Favorite Answer

    If they don't understand you, we as sure won't. Show us some code.... me want code! :P

Still have questions? Get your answers by asking now.