Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Scene update()
-
I was trying to have a timer update every time a sprite is tapped 20 times. I would like the code to be executed once every 20 taps. When I put the code in the update() it executes the code more than once more. How do I control this. I would like to have a condition checked all the time but only happen once whenever the condition is true.
Def update(self): if self.tap_count == 20: self.timer_value += 15
-
I put this code under touch_began() and its how I want. Every time the button is clicked the amount of taps is checked and if it meets the condition it adds 15 to the time.
if self.tap_count % 20 == 0 and self.tap_count != 0: self.timer_value += 15