pheinox Posted July 22, 2013 Share Posted July 22, 2013 i need help. for the life of me i cant build a script that plays sound files in order from the inventory when the avatar walks.just like a walker but can play multiple sound files to make 20 or idunno 50 second loops ive been trng for almost mounth to build it but i runn into all kinds of errors i dont know how to fix so if any one knows of one or is able to make one that would be very helpful Link to comment Share on other sites More sharing options...
steph Arnott Posted July 22, 2013 Share Posted July 22, 2013 Not sure what you mean, but sound snippets have to be less than 10 sec and have to be pre loaded or they will not work well preloaded if you want then to play congruently Not sur how to answer without looking at the scripts, it just not very helpfull. Link to comment Share on other sites More sharing options...
pheinox Posted July 22, 2013 Author Share Posted July 22, 2013 i dfo have a script that sort of dose what i need it to but ive been trying to make it so it dosnt play the first sound over after one use it woul play both files in order then play the first one agian and play both in order agian key owner; key sound1="part 1"; key sound2="part 2"; integer tlapse =0; default { changed(integer ch) { if(ch&CHANGED_OWNER) { llResetScript(); } } state_entry() { owner=llGetOwner(); llSetSoundQueueing(TRUE); llSetTimerEvent(0.5); } timer() { if(llGetAgentInfo(owner) & AGENT_WALKING) { if ((llGetUnixTime() - tlapse) >= 1.0) { llPlaySound(sound1,1.0); llPlaySound(sound2,1.0); tlapse=llGetUnixTime(); } } else { llStopSound(); tlapse=0; } } } Link to comment Share on other sites More sharing options...
kayla Mekanic Posted June 9, 2014 Share Posted June 9, 2014 If you ever figure it out, could you show me? I've been trying for months to make a working 2 part walker script but it always screws up on me Link to comment Share on other sites More sharing options...
Rolig Loon Posted June 9, 2014 Share Posted June 9, 2014 It's not really all that hard. Treat it like a light switch problem. Put a global switch in your script -- a variable that toggles TRUE/FALSE. Every time the timer event triggers, flip it from TRUE to FALSE or vice versa. Then, depending on which one it is, play either sound #1 or sound #2. The only minor trick is making sure that your timer doesn't fire any faster than the length of your longest sound clip, and being sure that the timer itself is turned off when AGENT_WALKING is FALSE. Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now