The International Simutrans Forum

 

Author Topic: How to make a vehicle with sound  (Read 2539 times)

0 Members and 1 Guest are viewing this topic.

JustinKwan

  • Guest
How to make a vehicle with sound
« on: July 14, 2009, 06:38:26 AM »
how the dat file should be writen to make a vehicle having sound?

Offline vilvoh

  • One of the good guys
  • Administrator (Inactive)
  • *
  • Posts: 4504
  • I'm the constructor, the architect
    • Escala real
Re: How to make a vehicle with sound
« Reply #1 on: July 14, 2009, 06:48:30 AM »
From the en.wiki:
Quote
Sound: Can be either a number or a filename (which must not begin with a digit).
  • A negative number (e.g. sound = -1) will cause no sound to be played.
  • A non-negative number n (e.g. sound = 5) refers to sound[n], as indexed in pak_dir/sound/sound.tab.
  • A filename (e.g. sound = engine-start-diesel-0.wav) refers to a wave file located in pak_dir/sound/.



Offline VS

  • Senior Plumber (Devotee)
  • Moderator
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: How to make a vehicle with sound
« Reply #2 on: July 14, 2009, 07:23:21 AM »
To clarify... -1 is default when not specified and numbers are deprecated, so the preferred way of adding sounds (if present at all) is simply writing in dat file

sound=somefile.wav

and putting the corresponding sound file to pak128/sound (change according to target pakset).