Jump to content
Sunbleached

Vehicle script, adding IDLE sound

Recommended Posts

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!

Share this post


Link to post
Share on other sites

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.

  • Thanks 1

Share this post


Link to post
Share on other sites

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.

  • Thanks 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...