Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Rockable Guitar

Fox Absolute
Registered User
Join date: 30 May 2005
Posts: 75
07-14-2006 16:49
Well actually, keytar. I built a model Roland AX-7 for myself and currently carry it around on my back. I would love a way to get it to loop one of several contained sound clips on command while simultaneously looping an animation.

This shouldn't be too hard, but the whole concept of scripted sounds and animations along with permissions just baffles me. :3
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
07-14-2006 23:48
OK, there are a batch of things you want here...

llLoopSound will let you loop your sounds. That might not be quite what you want, in which case the sound commands might be more useful, but start with looping sound.

For the anims... you can't, yet, script anims to loop nicely. The person making the anim chooses if it loops or not. The process runs:

Request Permissions then in the run_time_permissions event check they said yes. (If your animation script is in the root of the attachment (the keytar) it's automatically granted without a dialog box, but it's still necessary to ask).
You can play your anims directly from this event, but remember to stop the old one before starting the new each time!

Alternatively, the nicest way to do it is check everywhere else that you want to trigger the animation from that you've got permission to do that using llGetPermissions and if you haven't request them there and then.

If you need to try and loop a non-looped anim - it's messy. The trick is to time the anim precisely, and restart the anim after the right period of time using timers. Since sims run fast and slow and timing's imprecise this doesn't work 100%, but it's the best we can do at the moment.
_____________________
Eloise's MiniMall
Visit Eloise's Minimall
New, smaller footprint, same great materials.

Check out the new blog