lachlantula
Dec 10, 2016 - 07:08
I know this has been asked before, but I have a different scenario where the solutions suggested won't work. The app crashes when certain functions featuring sleep are run. Pythonista 3.
Here's a sample of code that can sometimes crash the app:
import time
import sound
vol = 0.1
for _ in range(3):
sound.play_effect('rpg:Footstep01', vol)
vol += 0.1
time.sleep(1)
sound.play_effect('rpg:Footstep02', vol)
vol += 0.1
time.sleep(1)
sound.play_effect('rpg:Footstep03', vol)
vol += 0.1
time.sleep(1)
Any ideas? This function is decorated by @ui_in_background as it is called by the update function built into scene.
(No, that doesn't mean there are footsteps playing all the time, it's part of an AI I'm working on:p)