Hi i just started playing with the editor and i was able to define a sound (which is a music) and connected a pressure plate to my script and everything is fine. My question is, is it possible to destroy that sound ? I tried to destroy the sound but wasnt able to do it.
Is there no way to stop a sound or something ?
Using music with the playSound() and destroy ?
Re: Using music with the playSound() and destroy ?
There is a relatively complicated workaround, can be found here:
viewtopic.php?f=14&t=4512&p=47328
This is currently the best approach to start/stop (looping or not) sounds and make them keep playing even after reloading a save game.
viewtopic.php?f=14&t=4512&p=47328
This is currently the best approach to start/stop (looping or not) sounds and make them keep playing even after reloading a save game.
Re: Using music with the playSound() and destroy ?
Yeah ive seen that one but its only for a door. I dont think i can do that for a pressure plate or lets say that the sound stop when the monster is dead since there is no sound destroy or soundStop()
Re: Using music with the playSound() and destroy ?
I think you misunderstand how this approach works. The door is only used to play the sound (due to technical limitations this is the only way to stop the sound at will). There is no door the player can see or run into. You can use this workaround with every sound effect you like.
Re: Using music with the playSound() and destroy ?
Yeah im sorry you are totaly right there
"The door is invisible & is spawned then immediately opened thus producing the lockSound which is your defined sound. This fixes problem #4 as door produced sound does not occur on every level as playSoundAt() does. The sound can be stopped at anytime by simply destroying the door which fixes problem #1. The door never blocks anything as it's opened the moment it's spawned at a velocity of 100."
Thx i will try that later
"The door is invisible & is spawned then immediately opened thus producing the lockSound which is your defined sound. This fixes problem #4 as door produced sound does not occur on every level as playSoundAt() does. The sound can be stopped at anytime by simply destroying the door which fixes problem #1. The door never blocks anything as it's opened the moment it's spawned at a velocity of 100."
Thx i will try that later