tino
New Member
Posts: 5
Posts: 5
|
Post by tino on Dec 6, 2014 16:02:33 GMT
Hi there,
First: I just bought your Asset and Im really happy with it, it seems to be very intuitive! Thanks a lot and keep on going!
I ve seen your tuts videos and searched & read some parts of your manual pdf but I still stuck trying the following:
I have a "Beam weapon" continuously firing a ray to the target. The firing time is variable so Im not able to extend the "beam sound file" to the time I need and then just fire once without "loop clip". So I am looping this audio file. When I check "Loop Clip" in the Audio Group its played forever after it was fired in the first time. So, whats the best way with your tools to stop such a looped audio?
1. Is it possible from script? (I found a function in your PDF to stop all audio from a audio group - do I then stop all beam weapon sounds in the scene or just the one I need?) 2. Via Custom events? But I dont understand how to setup the "Loop end". I cant find an option in "EventSounds" or "Event Calc Sounds" to kill the loop.
Thank you for your help! Kind regards, Tino
|
|
|
Post by DarkTonic Dev on Dec 6, 2014 20:28:10 GMT
EventSounds has a command under Group Control called Stop Sound Group Of Transform. That does what you want if there's an event you can use. In order for that to work, when the sound is played you need to "follow caller" or "attach to caller". If you don't have an event, you can use code to do the same thing: MasterAudio.StopSoundGroupOfTransform(this.transform, "YourSoundGrouName"); Also, if you want the sound to stop when the object "making" the sound gets destroyed or despawned, then you don't need to use any code. You can set the Sound Group's "Caller Despawned Mode" to Stop or Fade Out in the Group's Inspector. Make sure you've looked at the API website as well, it explains what each method does from code There's a link in the readme on page 2 and at the end.
|
|
tino
New Member
Posts: 5
Posts: 5
|
Post by tino on Dec 9, 2014 8:30:05 GMT
Thank you! All solutions are good enough!
|
|
|
Post by DarkTonic Dev on Dec 9, 2014 8:52:57 GMT
Cool
|
|