ap
New Member
Posts: 22
Posts: 22
|
Post by ap on May 17, 2015 22:10:25 GMT
Is there a possibility of adding to the available actions a "start sound if no sound is playing/stop sound if sound is playing" type of script?
So that I collide with an object and it triggers a sound and then I move away, and then collide with the same object again and it stops the sound....
Is that do-able? I guess it's a toggle action?
Thanks!
|
|
|
Post by DarkTonic Dev on May 18, 2015 1:50:58 GMT
I don't think that's possible in a way that scales, depending on what you want. Example to illustrate:
1) There could be 4 clones of the same sound in a Sound Group, or 4 different Variations of that Sound Group. 2) Play a sound if none of that Group is playing - no problem here. 3) Stop sound if sound is playing: here's the problem. I assume you wouldn't want to stop all 4. The other 3 might have been triggered from other game objects. One options is to stop only instances of the Sound Group that were triggered from the same game object you're on. But I don't know if that's what you're looking for?
-B
|
|
ap
New Member
Posts: 22
Posts: 22
|
Post by ap on May 18, 2015 9:04:45 GMT
One option is to stop only instances of the Sound Group that were triggered from the same game object you're on. But I don't know if that's what you're looking for? Yes, exactly this if I understand you correctly. I think a 'stop all' command is fine. Basically it would stop all the sound(s) in the object just triggered.
|
|
|
Post by DarkTonic Dev on May 18, 2015 15:56:45 GMT
Ok, I'll see if it's easily done.
|
|
ap
New Member
Posts: 22
Posts: 22
|
Post by ap on May 18, 2015 18:26:04 GMT
Thanks!
|
|
|
Post by DarkTonic Dev on May 18, 2015 22:20:07 GMT
No problem.
|
|