Welcome to the forum, Jason.
Tips:
Have a look at Wiki - how to post code on this forum. It will then render as (but I'm guessing your indentation):
def transform(self, value, quality, timestamp):
while value == True:
self.getChild("Audio20").props.play = True
import time
time.sleep(30)
else:
self.getChild("Audio20").props.play = False
return value
- Pretty much any time you are using
sleep()
in a script you are doing something wrong. - You have
import time
inside a while loop. It should be outside so it only happens once (but you shouldn't be usingsleep()
anyway). - You have an
else
statement with noif
. (See @pascal.fragnoud's comment below.) while value == True:
can be reduced towhile value:
.