generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: How to know whether a sound is finished loading,

Previous Thread :: Next Thread 
Zenuvius is not online. Zenuvius
Joined: 26 Aug 2014
Total Posts: 551
17 Jul 2015 07:50 AM
Assets = {2253543,2434541,5133543,2423433,41143243,2453865,21433365,2154549}

for _, asset in ipairs(Assets) do
Game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=" .. asset)
end

====

The script above preload the sound IDs in the Assets right, what I wanted to do is I want to run a script ones all this sounds are done being loaded as I'm working on a Loading Screen script so I want to end the load when everything is done loading.
Report Abuse
Zenuvius is not online. Zenuvius
Joined: 26 Aug 2014
Total Posts: 551
17 Jul 2015 07:50 AM
Is there a function that tells you when the assets are loaded ?
Report Abuse
buildersteven4 is not online. buildersteven4
Joined: 08 May 2009
Total Posts: 1325
17 Jul 2015 07:55 AM
This waits until all assets are loaded. There is no way to check if a specific asset is loaded as far I know.

while game.ContentProvider.RequestQueueSize > 0 do wait() end
Report Abuse
buildersteven4 is not online. buildersteven4
Joined: 08 May 2009
Total Posts: 1325
17 Jul 2015 07:55 AM
http://wiki.roblox.com/index.php?title=Custom_loading_screen
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
17 Jul 2015 07:57 AM
PreloadAsync waits, (or is supposed to wait), until the assets or asset specified is finished loading. However, as far as I can tell it doesn't currently work.
Report Abuse
Zenuvius is not online. Zenuvius
Joined: 26 Aug 2014
Total Posts: 551
17 Jul 2015 07:58 AM
Mate you're my lifesaver <3
Report Abuse
buildersteven4 is not online. buildersteven4
Joined: 08 May 2009
Total Posts: 1325
17 Jul 2015 08:00 AM
Yea, I noticed that too. But it seems he just want to wait until al assets are loaded. The custom loading screen tutorial is exactly what he wants.
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
17 Jul 2015 08:03 AM
No, it waits until all assets in the array that is passed to it finish loading.
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
17 Jul 2015 08:05 AM
What you gave him waits until all assets are finished loading.
Report Abuse
buildersteven4 is not online. buildersteven4
Joined: 08 May 2009
Total Posts: 1325
17 Jul 2015 08:05 AM
I was talking about this line:

while game.ContentProvider.RequestQueueSize > 0 do wait() end
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
17 Jul 2015 08:07 AM
Yeah, that waits until all assets are loaded, but he just wants to wait until all assets in the array are loaded.
Report Abuse
buildersteven4 is not online. buildersteven4
Joined: 08 May 2009
Total Posts: 1325
17 Jul 2015 08:22 AM
"I'm working on a Loading Screen script so I want to end the load when everything is done loading."
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
17 Jul 2015 08:24 AM
He meant everything loaded in that script.
Report Abuse
buildersteven4 is not online. buildersteven4
Joined: 08 May 2009
Total Posts: 1325
17 Jul 2015 08:27 AM
Meh. I thought this solution is more fitting.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image