Stopping sounds played with "playSound()"?

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
Lilltiger
Posts: 95
Joined: Sun Sep 16, 2012 1:12 am

Stopping sounds played with "playSound()"?

Post by Lilltiger »

Is there a way to stop a sound that is played using the "playSound()" function, I cant find anything about that in the documentation nor in the forum.
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: Stopping sounds played with "playSound()"?

Post by Neikun »

redefine the sound and turn loop =false?
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
Lilltiger
Posts: 95
Joined: Sun Sep 16, 2012 1:12 am

Re: Stopping sounds played with "playSound()"?

Post by Lilltiger »

That do not stop the sound, it just stops it from repeating, but if i have a sound that is 4min+ long, but want to stop upon user interaction.
Batty
Posts: 509
Joined: Sun Apr 15, 2012 7:04 pm

Re: Stopping sounds played with "playSound()"?

Post by Batty »

A stopSoundAt(sound, level, x, y) would be great. Even a stopSoundAt(x, y) that just stopped all sounds in x, y would be good.

I've tried several things and can't get sounds to stop.
Lilltiger
Posts: 95
Joined: Sun Sep 16, 2012 1:12 am

Re: Stopping sounds played with "playSound()"?

Post by Lilltiger »

or stopSound(soundname)
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Stopping sounds played with "playSound()"?

Post by Komag »

one possibility would be to break up that 4min sound into something like 10 second increments (24 of them) and have a timer set to 9.9 seconds which starts the next segment UNLESS something has happened, in which case the timer won't play the next part. It wouldn't be an exact end to the sound in the right moment, but at least it would end within a few seconds.
Finished Dungeons - complete mods to play
Lilltiger
Posts: 95
Joined: Sun Sep 16, 2012 1:12 am

Re: Stopping sounds played with "playSound()"?

Post by Lilltiger »

I have been thinking about doing it like that, just a lot of extra work
Post Reply