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: Preload

Previous Thread :: Next Thread 
iCMD is not online. iCMD
Joined: 06 Jan 2012
Total Posts: 7
13 Feb 2015 09:17 PM
Wiki ( http://wiki.roblox.com/index.php?title=API:Class/ContentProvider/Preload ) says:

"That is, the Preload method doesn't wait until the content has finished loading before returning"

How do I make the 'Example' code on the Wiki wait until the content has finished loading, then print ("Done") or such? I've seen other games do it but I'm not sure about how to do this.

Thanks for help!
Report Abuse
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
13 Feb 2015 09:19 PM
repeat wait() until Object
Report Abuse
iCMD is not online. iCMD
Joined: 06 Jan 2012
Total Posts: 7
13 Feb 2015 09:19 PM
So I could do: repeat wait() until "http://www.roblox.com/asset/?id=12222058"

?
Report Abuse
iCMD is not online. iCMD
Joined: 06 Jan 2012
Total Posts: 7
13 Feb 2015 09:25 PM
hello
Report Abuse
iCMD is not online. iCMD
Joined: 06 Jan 2012
Total Posts: 7
13 Feb 2015 09:27 PM
yes hi this is pizza hut
Report Abuse
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
13 Feb 2015 09:33 PM
Waiting for a specific item in the queue... seems impossible (or hidden deep in the bowls of Cthulhu). Therefore, the only legitimate answer we can give you is the one that's provided on the wiki page.


Though, if you squint really hard you may misinterpret it and that might yield what you wanted to see. I hear lots of people like doing that.
Report Abuse
iCMD is not online. iCMD
Joined: 06 Jan 2012
Total Posts: 7
13 Feb 2015 09:35 PM
can I get a real answer not troll
Report Abuse
Ojia is not online. Ojia
Joined: 08 Feb 2012
Total Posts: 650
13 Feb 2015 09:43 PM
game.ContentProvider:Preload(Your asset here)
Report Abuse
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
13 Feb 2015 09:44 PM
We can't stop you from reading only part of the wiki page, but we do advise against it.
Report Abuse
nicemike40 is not online. nicemike40
Joined: 19 Dec 2008
Total Posts: 1814
13 Feb 2015 11:10 PM
I was about to tell these guys off for yelling at you, but its literally in the same paragraph that you quoted. THEY GAVE YOU THE CODE:
"""

It will, however, queue the requests, meaning that you can use the RequestQueueSize property of ContentProvider to wait for all assets to load. See below for example implementation.

local ContentProvider = Game:GetService("ContentProvider")

local function WaitForAssetsToLoad()
-- Yields until all requested assets are loaded.

while (ContentProvider.RequestQueueSize > 0) do
wait()
end
end

"""

~Upload code to codepad-dot-org with Lua syntax highlighting to preserve indentation and make it easier to read!~
Report Abuse
nomer888 is online. nomer888
Joined: 13 Feb 2010
Total Posts: 551
13 Feb 2015 11:27 PM
See this:

http://www.roblox.com/Forum/ShowPost.aspx?PostID=134656753
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