Simas 12 Posted May 13, 2013 I am interested in playing a 3D world-positioned sound effect and then stopping it at a certain point (using scripting). Here is what I tried so far: say3D and playSound3D when used on the same object do not replace/stop old sound but simply play the same sound again (on top of the old). Thus - not really possible to stop sounds started with these two functions. The createSoundSource and then deleteVehicle on the sound object does not work (reported as a bug #8231). Any other options I am missing? Share this post Link to post Share on other sites
killzone_kid 1330 Posted May 13, 2013 Set volume to 0? can try fadeSound fadeMusic fadeRadio Share this post Link to post Share on other sites
Simas 12 Posted May 13, 2013 Set volume to 0?can try fadeSound fadeMusic fadeRadio Yeah.. but fade* functions affect all the sounds in game, right? Still an issue where I want to silence only the sound I have created/started. Share this post Link to post Share on other sites
Messiah 2 Posted May 13, 2013 play a 'silent sound' instead Share this post Link to post Share on other sites
loyalguard 15 Posted May 13, 2013 In AEG I have game logics use the say command to play the sound and then deleteVehicle the logic when I need it to stop. It stops immediately. I then re-create the logic if I need to start the sounds again. 1 Share this post Link to post Share on other sites
killzone_kid 1330 Posted May 13, 2013 In AEG I have game logics use the say command to play the sound and then deleteVehicle the logic when I need it to stop. It stops immediately. I then re-create the logic if I need to start the sounds again. deleteVehicle doesnt delete the soundsource. did you say you use say? Share this post Link to post Share on other sites
Simas 12 Posted May 13, 2013 play a 'silent sound' instead You mean "\a3\sounds_f\dummysound.wss"? But where do a play this dummy sound to stop any existing sounds? As mentioned, say3D and playSound3D will simply start a new dummy sound, completely ignoring and not stopping my old sound. In AEG I have game logics use the say command to play the sound and then deleteVehicle the logic when I need it to stop. It stops immediately. I then re-create the logic if I need to start the sounds again. Interesting.. Can you be more specific? 1 Share this post Link to post Share on other sites
loyalguard 15 Posted May 13, 2013 deleteVehicle doesnt delete the soundsource. did you say you use say? I do not use a sound source, I have a game logic use "say" or "say3d" since it is invisible and deleteVehicle works without a problem. ---------- Post added at 11:08 ---------- Previous post was at 10:44 ---------- Interesting.. Can you be more specific? Here is a simple version: // Create side and group for logics if no already existing side or group. _side = createCenter sideLogic; _group = createGroup sideLogic; // Create a global variable (public if necessary) to determine when to play a sound. myBoolean = true; // Create a game logic at the desired position and give it a name. "Logic" createUnit [[0,0,0, _group, "mySoundLogic = this;"]; // Play the sound (make sure it is defined somewhere like Description.ext, a config file, etc.). while {myBoolean} do { mySoundLogic say ["mySound",5]; // "Say" the sound. sleep 5; // Adjust delay to match length of your sound. }; // When you want to stop the sound, make the variable false and delete the logic (it does not have to be the same script) to make it stop immediately.. myBoolean = false deleteVehicle mySoundLogic; Share this post Link to post Share on other sites
Lebiglebowskii 2 Posted August 17, 2019 A workaround i found is attaching an invisible object to player and using say3d to project sound from object then when task is completed or i want sound to end i just deletevehicle the object Not perfect but simple which is what I always try to go for Share this post Link to post Share on other sites