Jump to content

Sound activaor Camera script


ger4

Recommended Posts

This should be simple, but I can' work out how to do it. The film projector sound for the camera starts ok when I activate the object, but when I activate it again, i will not switch off.

 

Any suggestions would be much appreciated.

 

 

scn AAAOldCameraScript
 
short doonce
 
ref camera
 
string_var soundstring
 
Begin onActivate
set camera to GetSelf
let soundstring := $AAACameraFilm
 
if eval ((camera.GetSoundPlaying $soundstring))
camera.SetLoopSound AMBDripLP01
camera.Update3D
else
;set camera to GetSelf
;AAAOldCameraAct.SetLoopSound AAACameraFilm
camera.SetLoopSound AAACameraFilm
camera.Update3D
endif
 
 
 
end
Link to comment
  • 1 month later...

Would not it be easier  just to turn on and off the  sound source ( camera- switcher and  the sound source as object )?

 

25b0bc372631c2a460be2edc37235898.jpg

 

scn CAMERAscript

 

begin onactivate

if soundREF.GetDistance CAMERA>11111 ; the start dummy cell for soundREFs

soundREF.DISABLE

endif

 

if soundREF.GetDisabled==1

 

 

soundREF.moveto CAMERA

soundREF.ENABLE

 

 

else

soundREF.DISABLE

endif

 

 

ACTIVATE

end

 

Link to comment

Archived

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use