Jump to content

Welcome to LoversLab
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!
Photo

Sound activaor Camera script


  • Please log in to reply
1 reply to this topic

#1
ger4

ger4

    Doing Stuff

  • Members
  • PipPipPipPipPip
  • 933 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

  • 0

AdBot

AdBot
  • Advert

#2
TDA

TDA

    Mega Poster

  • Contributor
  • PipPipPipPipPip
  • 1,009 posts

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

 


  • 0