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 » Scripting Helpers
Home Search
 

Re: Random valid sound ID generator help?

Previous Thread :: Next Thread 
penguin38 is not online. penguin38
Joined: 08 Nov 2008
Total Posts: 1231
24 Oct 2011 12:48 AM
I have a great music player. In it, I have a great sound player. It allows people to input valid sound ID's to play simultaneously. Also, it allows you to edit the pitch and volume of the sound. The only problem is that it doesn't come with some giant list of sounds, and I can't exactly do that due to new sounds being made all of the time and not having enough room screen-wise. So I kept thinking about the idea of making a little button to the side that gives you a random sound ID from the actual ROBLOX site itself that will work. However, I have absolutely no idea how to do this, especially since some ID's are more than just things like http://www.roblox.com/asset?id=[NUMBERS].

I know there is a catalog browser for audios that's normally impossible to access via normal site browsing, but I don't know how to use it via scripting.

So, does anyone have any idea how I can do this?
Report Abuse
beeflord is not online. beeflord
Joined: 06 Jun 2009
Total Posts: 3372
24 Oct 2011 12:52 AM
I cant script but maybe something like...

http://www.roblox.com/asset?id=[math.randomhuge] --< idk xD
if the pitch exists (it is a sound)
then it inserts it.
else
if the pitch doesnt exist (not a sound)
end

Ofcourse thats not a script but I believe it's possiple to transfer.
Report Abuse
penguin38 is not online. penguin38
Joined: 08 Nov 2008
Total Posts: 1231
24 Oct 2011 12:57 AM
As far as I know, you can't check if a property exists or not.
And for that method, I would have to retry getting an ID if the grabbed ID isn't a sound. It would take TONS and TONS of tries, but it would eventually get it. But because there are so many tries, it would either make a GIANT lag spike if there isn't a wait(), or it would take FOREVER if there is a wait().

Unfortunately, that doesn't cut it.
Report Abuse
penguin38 is not online. penguin38
Joined: 08 Nov 2008
Total Posts: 1231
24 Oct 2011 01:32 AM
bump bump

help pl0x
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
24 Oct 2011 01:43 AM
Insert the sound IDs in a table and then you can use this:

    local sounds = {ID, ID, ID}
    local sound = SOUND
    
    while true do
        sound.SoundId = "www.roblox.com/asset?id="..tostring(sounds[math.random(1,#sounds)]) --Not sure on the property for the sound id nor the asset link.
    end
Report Abuse
penguin38 is not online. penguin38
Joined: 08 Nov 2008
Total Posts: 1231
24 Oct 2011 01:48 AM
That would do, but again, there are new sounds being made all of the time via gear.
Report Abuse
penguin38 is not online. penguin38
Joined: 08 Nov 2008
Total Posts: 1231
24 Oct 2011 04:26 AM
Bump T_T
Report Abuse
penguin38 is not online. penguin38
Joined: 08 Nov 2008
Total Posts: 1231
24 Oct 2011 06:09 AM
DANG IT, DOUBLE BUMP
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
24 Oct 2011 06:44 AM
> That would do, but again, there are new sounds being made all of the time via gear.

Then you'll have to update the list when a new sound comes out. There's no way of getting only the sound files from the catalog.
Report Abuse
penguin38 is not online. penguin38
Joined: 08 Nov 2008
Total Posts: 1231
24 Oct 2011 07:29 AM
I'm not going to be playing this game for forever, you know.

And I KNOW there is a way. Before I had asked for help in this same situation except for image ID's instead. I got results of old (about 2006-2008) model and place thumbnails, but it still worked and it was still from the catalog.

So there must be a way to do what I'm asking for.
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
24 Oct 2011 10:12 AM
With images, models, places and players you can get an image, but with decals you don't.
What you could do is check to see if it's a valid sound id. Instead of starting from 0, find the first sound ever made ID and go up from that to one trillion.
Report Abuse
penguin38 is not online. penguin38
Joined: 08 Nov 2008
Total Posts: 1231
24 Oct 2011 12:35 PM
Yeah, actual decals didn't show up...

And that's what beeflord basically suggested. Again, it would take tons of tries in order to get a working sound, which would lead to a huge delay.

Also, like I said before, not all sounds have number ID's like that.
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
24 Oct 2011 12:37 PM
He suggested from 0. And it wouldn't lag that much, you could just insert the valid IDs into the table and then use the script I told you.
Report Abuse
penguin38 is not online. penguin38
Joined: 08 Nov 2008
Total Posts: 1231
24 Oct 2011 01:08 PM
*sigh*

Unfortunately, it might actually just come down to doing that.

But there are S O O O many sounds that I'm DESTINED not to get them all, and it would take FOREVER to put them in an entire list.

And again, it wouldn't update when new gears come out.

I really want to save that for a last resort
Report Abuse
beeflord is not online. beeflord
Joined: 06 Jun 2009
Total Posts: 3372
24 Oct 2011 01:16 PM
I believe that my idea might work if you make it wait(0.001) or something low. Or just try it without 'wait'.

Also, I belive that Sound files is the only type that haves a pitch. You can see if it haves a pitch by saying something like


if sound.pitch == between 0(.001) and 1 then
add
else continue searching
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
24 Oct 2011 01:17 PM
@penguin At the start of the script run the loop and if it's a sound then insert it to a table. Then to pick it use the part I told you.
Report Abuse
penguin38 is not online. penguin38
Joined: 08 Nov 2008
Total Posts: 1231
24 Oct 2011 01:18 PM
I'm not exactly sure what the minimum is, but I know that the minimum time you can wait() is more than 0.001. If you just put wait() or wait(0), it would wait that minimum.

But even then it would still take a good pause to get to a proper ID; trust me, I tried it before with images.

And trying to find a nonexistent property of an object results in an error.
Report Abuse
penguin38 is not online. penguin38
Joined: 08 Nov 2008
Total Posts: 1231
24 Oct 2011 01:20 PM
@RATEX
Wait, are you saying to have a constantly running loop that adds new sounds in to a list that can be chosen from...?

Actually, that idea sounds somewhat effecient...
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
24 Oct 2011 01:42 PM
Yes, that's what I've been trying to tell you.
Report Abuse
penguin38 is not online. penguin38
Joined: 08 Nov 2008
Total Posts: 1231
24 Oct 2011 01:49 PM
Hmm...

If I made an already-filled list complete with as many sound ID's as I can find and then add that onto it, I guess that would somewhat serve the purpose in the long run. It would take a bit to actually get other sounds not on the list, and there would be few of them, but it still works.

I guess I could try it.
Report Abuse
penguin38 is not online. penguin38
Joined: 08 Nov 2008
Total Posts: 1231
24 Oct 2011 01:56 PM
You know what, I kind of don't think this whole idea in general isn't worth it anymore.

If people want sounds, they can look in ROBLOX Studio or the forums. They could find the sounds better there, even by looking up their sources, such as finding gear sounds via searching gear.

It would take freaking forever to get all of the sounds I know.
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
24 Oct 2011 02:09 PM
You could get a short list of sounds by getting one of these "Give yourself free gear" models, letting it insert all the gear, then scanning for `Sound` instances.
Report Abuse
penguin38 is not online. penguin38
Joined: 08 Nov 2008
Total Posts: 1231
24 Oct 2011 05:03 PM
Yeah.

I also found a couple of posts on a thread filled to the brim with unusual sounds.
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
24 Oct 2011 05:39 PM
You could do random numbers, but chances of getting a legit sound are uncountably small. Here's a list that Aaaboy97 found of sounds and their IDs:

http://www.roblox.com/Forum/ShowPost.aspx?PostID=46859608
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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