3 Replies Latest reply on Jun 22, 2006 6:56 PM by Roofy

    engine acceleration

    Roofy Level 1
      Hi guys,
      I am working on a 3d racing game where I have 2 of my cars ready to export. While I am working on exporting the cars and the scenery, I am wondering how do you make an engine acceleration sound when the user steps on the gas pedal and then deaccelerate when the user lets go of the gas pedal? Is this through lingo, or is it a loop sound or both?
        • 1. Re: engine acceleration
          ensamblador Level 1

          Pick a sound, import it in director, an play it when the user press a key, use the sound (channel) to play, pause or stops the sound (fade in and fade out supported)

          _sound.channel(x).play(member) --up to 8 channels.

          There is no way to store sounds in animations in a w3d file (i guess you are asking that too).

          • 2. Re: engine acceleration

            You can use the #rateShift property of soundChannel.

            -- code is something like this:

            pGear = 1 -- this is the variable for current gear, change it from 1 to 5 for example
            pNote = 2 -- some value between 0 to 11 , use this value between gears

            sound(1).play([#member: member("engine_gear"&pGear ),#loopCount:0, #rateShift:pNote ])

            you can use this pNote variable between gears and you need different sounds for all gears and all gear passing.

            You can see this kind of sound controls in my new game HANGAR3. You must use some vechiles to hear it :)


            • 3. Re: engine acceleration
              Roofy Level 1
              yeah thats the ticket. I actually did some reading about this and this is what I was refering to. Thanks