erem2k 10 Posted July 20, 2014 Hello folks, I'm here with another audio-themed question. Music (sound) is broadcasted by a object using Say3D command - and I need to find a way to stop broadcast using user's action (addAction, strapped to same object). I heard about attaching Game Logic object to the sound-broadcasting object and killing Logic as soon as user needs to stop playing music - is it possible in any way? Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted July 20, 2014 Tried this already? unit say3d ""; Share this post Link to post Share on other sites
erem2k 10 Posted July 20, 2014 Yup, sound dies, but with "Sound not found" - I'd want to make something more error-notification-free Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted July 20, 2014 Do you want to stop a longer type of sound or a sound that's been repeated in a loop? Units usually stop talking when dead, buildings and objects stop emiting sound when the damage value reaches 1. If damaging the unit isn't possible then let a game logic say the sound and kill the game logic as soon as you want the sound to stop. Share this post Link to post Share on other sites
erem2k 10 Posted July 20, 2014 (edited) Long one, apparently (music track is played). Game logic is spawned and deleted the way regular units are spawned (and deleted, obviously), right? Edited July 20, 2014 by Erem2k Share this post Link to post Share on other sites
rakowozz 14 Posted July 20, 2014 (edited) Why not do this? In CfgSounds, create a new class, but with no sound file or the same sound file/dummy file with reduced decibels. Not sure if the first would work, but reducing the dB would. class snd_test { name = "snd_test"; sound[] = {"sound\snd_test.ogg", db-100, 1}; titles[] = {}; }; Then tell it to say3D "snd_test". Not pretty, but should do it... Edited July 20, 2014 by rakowozz Share this post Link to post Share on other sites
erem2k 10 Posted July 20, 2014 Roger, will take a look Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted July 20, 2014 Why not do this? In CfgSounds, create a new class, but with no sound file or the same sound file/dummy file with reduced decibels. Not sure if the first would work, but reducing the dB would. class snd_test { name = "snd_test"; sound[] = {"sound\snd_test.ogg", db-100, 1}; titles[] = {}; }; Then tell it to say3D "snd_test". Not pretty, but should do it... I think this works similar to kbtell, since an object/unit can only say one thing at a time it will be added to the qeue, so it won't probably stop at the very moment you need it to. Share this post Link to post Share on other sites
erem2k 10 Posted July 20, 2014 I think this works similar to kbtell, since an object/unit can only say one thing at a time it will be added to the qeue, so it won't probably stop at the very moment you need it to. Err, I did a sound file containing no sound, declared it properly and made simple switch with it - still nothing, sound continues playing. I think approach with game logic will work - but how to spawn it (trough createVehicle or createUnit)? Share this post Link to post Share on other sites