Dondonini
|
  |
| Joined: 21 Dec 2007 |
| Total Posts: 734 |
|
|
| 13 Mar 2014 04:16 AM |
I don't know if I worded it right, but yeah.
I've been trying to find a way to detect if a sound instance is done playing. For example: Finding detect if the song is done so I can play the next one.
Is there a way? Been trying to figure this out for 2 months now.
-- dondonini Studios™ |
|
|
| Report Abuse |
|
|
|
| 13 Mar 2014 04:18 AM |
| prolly the isplaying property in it. |
|
|
| Report Abuse |
|
|
Dondonini
|
  |
| Joined: 21 Dec 2007 |
| Total Posts: 734 |
|
|
| 13 Mar 2014 04:20 AM |
I've tried that too many times. Realized that it only detects if the sound HAS BEEN played. :(
-- dondonini Studios™ |
|
|
| Report Abuse |
|
|
|
| 13 Mar 2014 04:23 AM |
| :'(, prolly put a boolvalue inside that sound and make a script that has the same LENGTH wait seconds, and then after the wait is finished (wait(samelength of your sound) set that boolvalue to true and then make the other scripts detects when the boolvalue change its value and an ifs condition whether it changes to true and if it changes to true it means the sound staphed playing. |
|
|
| Report Abuse |
|
|
Cawlonee
|
  |
| Joined: 03 Mar 2014 |
| Total Posts: 2687 |
|
|
| 13 Mar 2014 04:42 AM |
The changed event doesn't register?
I would think that the isPlaying property would work. |
|
|
| Report Abuse |
|
|
Jonibus
|
  |
| Joined: 30 Jan 2010 |
| Total Posts: 8985 |
|
|
| 13 Mar 2014 04:52 AM |
playing = false
while wait() do if sound.isPlaying == true then playing = true else playing = false end end |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 13 Mar 2014 06:30 AM |
Even though this thread is dead atm
You don't.
You cannot detect when a sound has stopped playing unless you physically stop it. |
|
|
| Report Abuse |
|
|
Dondonini
|
  |
| Joined: 21 Dec 2007 |
| Total Posts: 734 |
|
|
| 13 Mar 2014 01:50 PM |
^^ Sigh. I've noticed now. I hope there is a way around this soon. :(
BTW. Who ever was talking about making a script that waits for the exact length of the song. I'm trying to make it work on a variety of songs. So that won't work. :(
-- dondonini Studios™ |
|
|
| Report Abuse |
|
|
|
| 13 Mar 2014 01:59 PM |
Playing = false Sound:Play() Playing = true repeat wait(0.001) if Sound.IsPlaying = false then Playing = false end until Playing = false
Woud that not work? |
|
|
| Report Abuse |
|
|
Jonibus
|
  |
| Joined: 30 Jan 2010 |
| Total Posts: 8985 |
|
|
| 13 Mar 2014 02:12 PM |
@War Wait() cannot be any shorter than 0.033333333 (repeating) The fastest wait you can get is game:GetService("RunService").RenderStepped:wait()
RenderStepped is equal to 0.01666666666 (repeating)
Follow me on twitter: @Jonibus_RBX |
|
|
| Report Abuse |
|
|
Jonibus
|
  |
| Joined: 30 Jan 2010 |
| Total Posts: 8985 |
|
|
| 13 Mar 2014 02:13 PM |
Also if statements require two equals signs if value == true then end
And why do you have the repeat and end placed like that? Doesn't make much sense to me.
Follow me on twitter: @Jonibus_RBX |
|
|
| Report Abuse |
|
|
|
| 13 Mar 2014 02:57 PM |
| Sorry messed up on == and if I do wait(0.0000000000000000000001) Wouldn't it round to the lowest possible |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 13 Mar 2014 02:59 PM |
*Refer to my post about unable to detect the end of a sound*
|
|
|
| Report Abuse |
|
|