|
Marya Miles
La di daa
Join date: 3 Jun 2007
Posts: 18
|
02-20-2008 05:46
I have three sound clips that I wish to be played in the listed order, when the object that contains them is being clicked on.
I would be very happy to find a script that would allow this. Can anyone help?
Greetings, Marya
|
|
Ollj Oh
Registered User
Join date: 28 Aug 2007
Posts: 522
|
02-20-2008 06:01
There are 3 different free full perm music scripts that can do that. 2 of them suck balls because they are coded poorly, inefficient and demand many obsolete parameters. the last one works nicely and is small, bit it sucks, too. So why do all music scripts that i found suck? because they ignore time dilation and they fail in using a do-while loop.
So heres my version, minimalistic efficient and it may work if i didnt make a typo in the syntax.
integer c;//scripts with more than 1 global variable make me giggle default{ touch_start(integer ollj_oh){ if (~c){ c=llGetInventoryNumber(INVENTORY_SOUND); do{llPlaySound(llLlGetInventoryName(INVENTORY_SOUND,c),1); //use llTriggerSound for "local" or "attachments". if(c) llPreloadSound(llGetInventoryName(INVENTORY_SOUND,c-1)); llSleep(9*LlGetRegionTimeDilation()); }while (--c)}}}
Then put sounds in the object that has this script. the sounds will be played from bottom to top, so just name the first one "999" the second one "998" ...
This script reacts on ANYONE touching it, but it doesnt start to play before the last part plays. A filter to make it only react to its owner, and to reset owner on rezzing, needs 2 more lines.
|