Gedankekojote97 Posted April 8, 2022 Posted April 8, 2022 Hello everyone, what code do i need to use if i want to make a sound play once ? Like this example : I want if the blacklight goes on, a relay off sound is played once. If the backlight goes off, a relay On sound is played once. If blacklight Then If LampState(62) = 0 Then table.ColorGradeImage = "LUT" & LUTset Else table.ColorGradeImage = "LUT14" End If End If if i put " PlaySoundAt , it plays all the time and is making loud noices Thank you !
Thalamus Posted April 9, 2022 Posted April 9, 2022 I beleive your problem is mostly this. You are hitting the ELSE all the time. Have you tried to see what values Lamp #62 actually has ? At least that is where I would begin. You have to remember here, you are inside a relative fast 10ms loop. I believe also that there was a new function added - a callback for light state changes. I'm not in front of VP right now and no time to look it up. Probably documented in commandreference.txt - believe it was something like getinplaystate or close.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.