Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I script this sound so it plays correctly?
genmills Offline
Junior Member

Posts: 47
Threads: 7
Joined: Mar 2011
Reputation: 0
#5
RE: How can I script this sound so it plays correctly?

(04-11-2011, 02:33 AM)palistov Wrote: Nah OnLeave() is for when you exit the entire map. Just make a collide callback function that fades the sound out when you go a certain distance into the cave. And if they backtrack, make it start the sound again (put 3 or a similar number for the fade-in effect in the function) as long as alState is -1. You will also need to make the area cover the whole cave, or else they'll pass through the area and the sound will stop for a moment, the restart (because they exited the area but are still inside the cave)

But they won't be coming out the way they came in, so they wouldn't hit the trigger area to start the ambient noise again. They'll have to go through some different "levels" in the cave. I just tried using OnLeave() with fading out the sound, and always fading it in on OnEnter() and that seems to work best for my situation.
(This post was last modified: 04-11-2011, 06:34 AM by genmills.)
04-11-2011, 06:34 AM
Find


Messages In This Thread
RE: How can I script this sound so it plays correctly? - by genmills - 04-11-2011, 06:34 AM



Users browsing this thread: 2 Guest(s)