Why is Player Loop not looping?

I'm trying to loop an alarm sound indefinitely but it only plays it for a moment and then stops. I noticed that when I change my clock TimerInterval to 500 it plays for half a sec before cutting off, and if set to 2000 it plays for two sec, etc.

Could somebody help me with this?
Thanks in advance.

EDIT: I finally understand my mistake. I removed the "not get global started" in my if condition. Then I can still keep the "set global started" to true without it causing a problem.

Your test in the clock timer will only work once, because after the first run the values in clock1.now will not equal your timepicker settings.
Your test seems a bit strange: if minute = hour ?
You set global started to true, which is then tested if false, so the player will not run.

1 Like

Hi

All of the Player settings must be performed before calling the Player to Start. So set the Source, Set the Loop to True, then call Player Start.

the following block only run for one minute only.

But, if you want your alarm to sound indefinitely, use the following block.

on both case, you should not include this block:
blocks(2) because it will invalidate your timer right away...

Haha yea, thank you very much! I played around with it and just removed the "not get global started".
I didn't even notice the '=", I guess it still worked cause it was comparing two booleans? But it's probably not good practice so I changed it to "and".

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.