Documentation/Engine/Sound/TruckRemote

From SCS Modding Wiki
< Documentation‎ | Engine‎ | Sound
Revision as of 08:24, 21 October 2021 by Lubos.scs (talk | contribs) (Event (remote/)"engine")

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Sounds - Remote Truck

The sound of a remote truck is in principle very similar to the sound of a player's truck engine.
(Please see the Sounds - Truck Engine for a better understanding.)

However, there are a few key differences to keep in mind:

  • The engine sound is integrated into one event (usually remote / engine). Including exhaust and turbo sounds.
  • Due to the performance, the sound for the remote truck needs to be significantly simplified.

Event "(remote/)engine"

Event "engine" plays sound of the engine of remote truck.
It has to be 3D event. The event should be routed to the "traffic" audio bus.
The event must be looped and its living cycle is controlled by "play" parameter (see bellow).

These event parameters must exist:

  • play
    The parameter "play" control living cycle of the event:
    value play = 1 means - sound is playing
    value play = 0 means - sound should be stopped
  • brake
    the value is in the range <0 - 1> and represents the action of the motor brake
  • load
    the value is in the range <0 - 1>
    value represents the motor load
    value < 0.05 means idle engine sound
  • rpm
    the value is in the range <0 - 3000>
    the value represents the number of engine revs per second
  • turbo
    the value is in the range <0 - 1> and represents the action of the turbo system

Remote Engine Sound Configuration

The sound configuration of the engine sounds is stored in the "accessory_engine_data" data.
There is array "sounds" which contents specification for the mandatory events of the engine.
That means that each type of the engine can have assigned its own sound bank.
The item "remote" has been added for the remote engine sound (since version 1.42)
Example:
There are configuration files of engines for the "Peterbilt 579" at the folder "\def\vehicle\truck\peterbilt.579\engine".
Each engine include @include "sound.sui" file which contents indirect definition of the events:

	sounds: 5
	sounds[]: "engine|/def/vehicle/truck/peterbilt.579/engine/sound_engine.soundref"
	...
	sounds[]: "remote|/def/vehicle/truck/peterbilt.579/engine/sound_engine_rm.soundref"

There are .soundref file (for each event) to specify bank end FMOD event of the sound.

Content of the sound_engine_rm.soundref is:

"source="/sound/truck/peterbilt_579_rm.bank#remote/engine"

Engine Sound Example

Visit the Downloads section to get template project or sound examples.