Jump to content

Recommended Posts

Evening guys,

 

I would appreciate some help on this im pulling my hair out of my head around this.
So basically what i have and want is the following
i have a generator which i want to loop a sound, which i can do, my question is this tho, via another addaction on the object i want it to execute another script, or ammend the current one by ending the looping audio file without deleting the object.

What i have is this to start the looping audio file :

 

generator = (_this select 0);

 

glb_Turn_Off_Generator = false;

 

publicVariable "glb_Turn_Off_Generator";

 

_answerAction = generator addAction ["Turn Off Generator", 

"scripts\generator_off.sqf", [], 6, true, true, "", "_this distance _target < 3"];

 

    while {!glb_Turn_Off_Generator} do

{

    generator say3D "genie_sound";

    sleep 125;

How would i be able to stop this loop ? Any help would be appreciated

Share this post


Link to post
Share on other sites

Place a sphere on your generator, and remove the texture on the sphere so it isn't visible. Play your sound on the sphere instead of the generator. To end the sound loop, simply delete the sphere. 

  • Like 2

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×