Sign in to follow this  
world

Force stop "playLoopSound"

Recommended Posts

When fulfills a entity stopLoopSound("my_sound"); sound file loses to the end and only then stops. How to stop playing forcefully?

for(;;){
      self waittill ("events_one");
    
      entity = spawn("script_model", self.origin);
      entity linkto(self);
      entity playLoopSound("my_sound");
    
      self waittill ("events_two");
    
      entity stopLoopSound("my_sound");
      entity delete();
}

 

Share this post


Link to post
Share on other sites

I dont know if there is a way to stop it, but you could just move the enitity really far away so you cant hear it any more

Share this post


Link to post
Share on other sites

deleting the entity should stop the sound I think. However not sure if it would have any negative effects.

Share this post


Link to post
Share on other sites

Removing the object does not help.
Now I use shorter sounds. The result is not ideal but acceptable.

Share this post


Link to post
Share on other sites
On 5/21/2019 at 8:19 PM, world said:

Removing the object does not help.
Now I use shorter sounds. The result is not ideal but acceptable.

Did you try my idea of just moving the entity?

Share this post


Link to post
Share on other sites
On 5/23/2019 at 9:29 PM, sheep_wizard2 said:

Did you try my idea of just moving the entity?

There was no time yet. I will check later.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this