ADuke 1 Posted January 16, 2011 Is there any way to stop a sound that was started with PlaySound in a script? -AD Share this post Link to post Share on other sites
ADuke 1 Posted January 16, 2011 fadeSound I have tried FadeSound, it does not seem to work, even when I set the forceplay to false when playing the original sound. Share this post Link to post Share on other sites
AZCoder 921 Posted January 16, 2011 I know that playMusic "" works for music, maybe playSound "" work for sound. That's empty quotes ;) Share this post Link to post Share on other sites
celery 8 Posted January 16, 2011 No way to do it. As an alternative, you can attach an invisible H to the player, make the H say the sound, and when you want to stop the sound, delete the H or set its damage to 1. Share this post Link to post Share on other sites
AZCoder 921 Posted January 16, 2011 Good solution, Celery. That works perfectly. Share this post Link to post Share on other sites
Guest Posted June 12, 2016 Celery, i don't understand what is H. Its a Human? Share this post Link to post Share on other sites
Muecke 114 Posted June 12, 2016 I think he means an unvisible Celery, i don't understand what is H. Its a Human? I think he means an unvisible helicopter marker. Share this post Link to post Share on other sites
Sgt.Spunkmeyer 14 Posted June 13, 2016 I used this same method to make a fake sound source. He means something like this: /* A simulated strange sound when the player is NOT the player. So player must be inside a vehicle as the driver. When he gets in the vehicle "aVehicleName" a Sound will play in loop until he gets out. "aVehicleName" is the name of a strange and medium damaged vehicle. Ex: Car1, Car2, ChopperX2,... */ if (!local player) exitwith {}; if (vehicle player != player) then { StrangeSound ="HeliHempty" createvehicleLocal position player; Strange attachTo [player, [0, 0, 0.2]]; WaitUntil { driver aVehicleName == player; sleep 0.1; if (vehicle player == player) exitwith {DeleteVehicle StrangeSound}; }; // Being the driver in the vehicle while (driver aVehicleName == player) do { HintSilent "You're hearing a Strange Sound in the motor."; sleep 5; StrangeSound SAY "StrangeSoundInVehicle"; // "StrangeSoundinVehicle" should be added previously to the mission in Description.ext }; // Strange sound must be 5 secons duration. Sure, you can change this aswell... 10 seconds sound ==> "sleep 10;" // That Sound will keep playing until player is not the driver. deletevehicle StrangeSound; // Deleting the object which was being used to play a sound when player was the driver. }; // If ENDS HERE if (true) exitwith {Hint "You don't hear that sound now}; // Message to confirm the End of the Script That could be an example. Sure it has little mistakes but It was just a quick idea but keeps the essence. I hope it helps you to understand the concept. Share this post Link to post Share on other sites
M1ke_SK 230 Posted March 4, 2017 On 1/16/2011 at 7:06 AM, w0lle said: fadeSound this will disable all sounds, not only source Share this post Link to post Share on other sites