Jump to content

Sound activaor Camera script


ger4

Recommended Posts

Posted

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
  • 1 month later...
Posted

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

 

Archived

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

  • Recently Browsing   0 members

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