Preston Beresford
-
Posts
3 -
Joined
-
Last visited
Content Type
Forums
Blogs
Knowledge Base
Posts posted by Preston Beresford
-
-
I've created a ride that has a music track that plays different songs in different "rooms" as the vehicle travels through them. I have been trying to come up with something that will preload the music clips for the rider so the playback doesn't cut out. The script I'm using calls up all of the clips by UUID when they attach the HUD at the beginning of the ride. However it doesn't seem to be working. The first ride through, the music cuts out even when wearing the HUD. The second time through it plays fine. Maybe there is something wrong in the script? Here is the one I am using:
integer len;
integer count;
list message;
integer tog;
default
{
attach(key id)
{
if (id) // if attached to an avatar
{
llResetScript();
}
}
state_entry()
{// make a list containing the sound uuid's - each group represents one full song track
message = ["6322ea90-636b-ee51-067d-80ff29f255de","a704fed7-b95f-5b46-ada6-c8fc86bc4a24","deac461c-ffb0-69f8-a2b7-0c19474fde0c","642d552c-3f51-d7ff-a13f-a4699eee8d96","6f207e56-6d3b-5dc4-180f-7ae000b669a1","c0a9a0e1-e16a-dd09-1f24-eceb6cd9f311","96199847-1067-cccb-f0bd-f110f98ce32a","a91c5197-6fde-0632-14ae-2b4dc0793ca9","b1648271-af15-2206-d058-950378d08eee","43af4af4-fc9a-935d-e92a-ad7509e900c3","6729d381-fb57-7237-c59f-c287737f480f","ea4720e4-7921-4611-72db-1ec645e533d0","444c35ae-046f-6c95-67d5-117786bad111","b97028af-27ca-2f0e-0d32-99b20afec75a","554d63ed-c077-eedf-c0e3-ca23cc548568","d1b93056-01c0-e2c4-6d7a-d0adc4f5012f","eaafa061-b7be-d5f0-0a70-02c6ef5a7df7","06558457-ab92-aea6-78f9-caf7ef80a273",
"00d2b43a-3fbe-5b23-4897-c050d1084e22","c80e8eb6-43ee-822c-93a1-bfcc6c7af58e","b1c1d290-663f-5815-1854-b39775933dce","bf810d3d-5d34-c181-52c0-f3dab12c52a7","fd8d1f00-cca3-80f4-ffd1-c87b2c901ea9","962ca6af-4eda-94da-3b04-50a53ec7a6c6","16962a4f-678e-b89b-6596-de7818eb3ec8","898c2517-ed26-8d3b-d285-504cf823ceb6","335d9b38-399d-9f4c-3a67-2741b643781f",
"e0b5ae94-d966-4cef-cf01-03703f0be2f1","49b31c00-2bc3-e56c-9468-1c79773000cd","70144860-9fe4-be5b-8ef6-e4b3950e52ad","c12f2a35-15c1-3b4c-72aa-d61194cde17c",
"8794d006-5aa4-2177-0f9b-745df2b6d913","829d1956-b6dc-3445-a601-0254ff627b26","9e4d9989-7a63-317b-b044-cd45b1d0e592","c8a76e04-7cc8-f36a-0355-d593d726a80d",
"08b0a3c2-2f62-2a11-d412-457fe96b210b","a9d0c856-86cd-1b21-bc36-76be505c1e64","22a28d50-1889-861d-4fcf-f2725ccabb4c","331b46eb-b840-7c4e-398e-0f40be4c20fa",
"c6e90401-3532-6f8d-d573-623166d792e7","046aa05f-96b6-7c72-0a26-0574fdf5b4b9","120b0355-16d0-2210-58e9-1e465e43fc61","de5217df-e93e-7f73-3a63-1105b2d3d1d7",
"ae927ba9-acb0-4637-3d67-af1ee7940251","05f3ee69-9238-b27c-b3ca-a4e37ac6dae3","3a21d19a-c088-f06e-07a4-c92615ada204","39943028-8c2c-becf-5693-ab3cd212cacf","812e4011-8063-c977-de52-287ead1bfce1","8e87a3b0-a2af-30e8-c82d-a06208c52ccb","767215d9-7b2d-1377-23b6-a51b97d408e0","2fb860ff-9820-80be-b8c6-83d46bb1228b","c8e0467e-ad0f-128a-263d-67a4677c38f1","cd711f54-958b-4499-9647-5b72a8b77bba","94b117d8-974b-9dac-0c55-335d1ab6313f","135c9f49-3e3c-e218-fa53-ffb850cf25cf"];
len =llGetListLength(message);
integer n;
for(n = 0;n < len;++n) // a for loop starts at zero and runs until n equals the number of items in the list "message"
{
llPreloadSound( llList2String(message,n) );
}
}
}Am I missing something?
-
I have a 4 seater vehicle that travels on a specific path. At a certain point in the path, I need a rezzer that will sense the vehicle's presence, rez one copy of an object from the contents, then reset and wait for the next vehicle to be sensed before rezzing another one. I can't seem to find something that does this task. The scripts I've tried either don't rez anything, or rezzes multiple copies. I'm more of a builder than a scripter, so I really don't have the expertise in this area. Any help would be greatly appreciated!
Music clip preloader HUD
in LSL Scripting
Posted
Yes, the number of clips has been a concern of mine, and I was thinking that may be the issue. However I can attach the HUD and wait 5-10 minutes before riding and it still doesn't queue the music properly. Yet on the 2nd ride it seems fine. I'm kinda stumped.