Sunbleached Posted July 9, 2019 Share Posted July 9, 2019 Hello! Please help to add idle engine sound to the hover board script. There are start up, shut down, jump, prejump, land, brake sounds in it, but the most necessary one is missing. Any suggestions how to do this? I would like it to sound when the avatar sits on it after the start up sound and off after the shut down when the avatar gets up. I would appreciate any help! Link to comment Share on other sites More sharing options...
Rolig Loon Posted July 9, 2019 Share Posted July 9, 2019 Like most of your other questions, this one is not about the syntax of scripting but about logic.If you're going to become much of a scripter, you'll have to get used to thinking these things through for yourself. In this case, you have already answered the question before you start. You want to trigger the sound when you sit down, so that's in your changed event. You want it to keep on running until you tell it to stop, to that means that you'll be triggering llLoopSound. The sound will stop not only when you stand up (the changed event again) , but also when you want to play one of your other sounds. Therefore, you'll also need to think about restarting the llLoopSound when any one of the other sounds stops. The easiest way to do that, probably, is to start a timer whenever any of the other sounds plays, and then llLoopSound your idle sound again when the timer fires. 1 Link to comment Share on other sites More sharing options...
animats Posted July 10, 2019 Share Posted July 10, 2019 Advanced hint: If you have something that makes a continuous sound that shouldn't sound repetitive, like an engine sound, there's a useful trick. Get a long recording of the desired sound and cut out four samples of 10 seconds or less which, played one after another, sound good in any order. Play them randomly, with the constraint that the same sound is never played twice in a row. Why four? Seems to be a limit in human auditory memory. Two samples played alternately sound repetitive. Three samples played randomly sound somewhat repetitive. Four sound unique. Drum machines use this trick. I have a squeaky wind vane that does this. 1 Link to comment Share on other sites More sharing options...
Sunbleached Posted July 12, 2019 Author Share Posted July 12, 2019 @Rolig Loon @animats Thank you so much! I did like you advised, works perfectly! 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