How do I make an accelerating engine sound?

  • Trying to set the engine sound to match speed of car. Any help would be appreciated

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Just use the audio object and change pitch

  • I don't see pitch anywhere

  • You do it by setting the playback rate to different numerical values.

  • Thanks, found the playback rate but I cannot figure out how to set it to the car speed? Any ideas..tried for a very, very long time to figure it out and can't

  • lovjc7

    it would help to have a test capx file to look at, otherwise you are only going to get vague suggestions...

    but what you want to do is "scale" the speed to a range of playback rates.

    so, in the Set Playback Rate action, you would set Playback rate to:

    1.0 * car.Platform.Speed / car.Platform.MaxSpeed

    obviously, that is assuming you are using the Platform behavior. Also, you would have to find what range of rates sound good with the sound effect you are using - what would be the minimum rate and what would be the maximum.

    if the minimum rate you want is 0.5 and the maximum is 1.4, then you would need to set the rate to:

    0.5 + 0.9 * Sprite2.Platform.Speed / Sprite2.Platform.MaxSpeed

    or as a general function: set playback rate to: min rate + (max rate - min rate) x current car speed / max car speed

    you might want to adjust the volume of the engine sound by scaling it in a similar way...

  • Wow!..I feel like you just gave me some gold..thanks alot. I'll give it a try

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)