Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

help with sounds

Mercer Faulkner
Registered User
Join date: 11 Nov 2005
Posts: 2
01-10-2006 12:52
I have made a script for a car, complete with sounds for starting and idling, but when i try to put in a loop for a driving sound (engine revving) it just keeps starting the looped sound over while the forward control is held. Ive tried all kinds of loops like: if(speed > 15){ llLoopSound("driving",1);} and other things of that nature, but every time i add something like that one of two things happens, the car drives and the sound just keeps restarting as it goes or the car wont move at all and the sound will loop normally.

any help will be greatly appreciated. thanks.
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
01-10-2006 17:30
Your best bet I think is to call llStopSound() before starting your llLoopSound(). Since I can't see the rest of your code, I can only guess at what's happening. You may be calling the startup sound using llLoopSound() versus llPlaySound().... or you may have the llPlaySound() function in a control response, meaning llPlaySound() is called repeatedly to play the startup sound while a certain control key is pressed.
Introvert Petunia
over 2 billion posts
Join date: 11 Sep 2004
Posts: 2,065
01-10-2006 18:19
I know this is totally not what you are asking about, but I'll say it anyway.

While automobile sounds add to the realism of a vehicle, they are an unpleasant side effect of the internal comustion engine that we've become accustomed to or tolerate in RL.

For the stationary bystander, vehicle sounds are a brief annoyance, for the person driving the vehicle, they can be cute at first and then downright irritating at length.

I strongly recommend that you consider addding the following features as suits you:
  1. a volume control that goes down to "off"
  2. sounds when the vehicle changes speed or mode are good feedback, drones are boring
  3. damp the high-end (over ~4kHz) of the sound significantly using external equalization, drop any part of the sound below about 150-200Hz as they tend to rattle most computer speakers
  4. study other popular vehicles to see how little sound they actually make
Your customers will thank you even if they don't thank you.