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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 17 Jul 2015 07:55 AM |
| http://wiki.roblox.com/index.php?title=Custom_loading_screen |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| Joined: 26 Aug 2014 |
| Total Posts: 551 |
|
|
| 17 Jul 2015 07:58 AM |
| Mate you're my lifesaver <3 |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 17 Jul 2015 08:03 AM |
| No, it waits until all assets in the array that is passed to it finish loading. |
|
|
| Report Abuse |
|
|
|
| 17 Jul 2015 08:05 AM |
| What you gave him waits until all assets are finished loading. |
|
|
| Report Abuse |
|
|
|
| 17 Jul 2015 08:05 AM |
I was talking about this line:
while game.ContentProvider.RequestQueueSize > 0 do wait() end |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 17 Jul 2015 08:24 AM |
| He meant everything loaded in that script. |
|
|
| Report Abuse |
|
|
|
| 17 Jul 2015 08:27 AM |
| Meh. I thought this solution is more fitting. |
|
|
| Report Abuse |
|
|