Jump to content

PlaySound Script help


Recommended Posts

Posted

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 :) !

Posted

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.

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...