SOUND SCRIPTS

Soundscripts give ambient or directional sounds to objects. They cannot be used on track, bridge or spline objects. WAV files should be located within the same directory as the config.TXT file.

Config.TXT for MOJUNCTION Config.TXT for THUNDERBOX

kuid <KUID:###:#####>
kind mojunction
region Australia
trackside 2
light 1
mode0 lever1
mode1 lever2
soundscript {
         toggle {
                trigger toggle
                distance 5, 100
                nostartdelay 1
                repeat-delay 1
                sound {
                points.WAV
                }
         }
}

kuid <KUID:###:#####>
region Australia
light 1
kind scenery
type Residential
soundscript {
         dayloop {
                repeat-delay 15,50
                distance 5, 50
                sound {
                strain_1.WAV
                }
          }
}

Config.TXT for MAP Config.TXT for PEOPLE CROWD

kuid <KUID:###:#####>
kind map
soundscript {
         morning {
                ambient 1
                value-range 1, 0.1
                volume 0.3
                sound {
                ctry_day_1.WAV
                }
         }
         night {
                 ambient 1
                value-range 0, 0.9
                volume 0.3
                sound {
                night_loop.WAV
                }
         }
}
username ""
workingscale 0
workingunits 0
water <KUID:-1:8009>
region Britain

kuid <KUID:###:#####>
kind scenery
region Australia
type People
soundscript {
         daysingle {
                repeat-delay 0
                distance 3,150
                sound {
                crowd_1.WAV
                }
          }
}

TAGS DESCRIPTIONS

repeat-delay

1 or 2 numbers (min, max, in sec)
time to delay between the end of the sound playing, and playing it again randomized between (min . . max)
default min = 0
default max = min

attachment

attachment point on the object to attach the sound to.
default: origin of parent object
not used for ambient sounds

distance

2 numbers (meters)
1st number = the distance at which the sound is played at 100%
2nd number = the cut-off distance -- doesn't affect the volume of the sound
default: 50m, 150m

sound

list of *.WAV files to play (randomly picked)

volume

gain of the sound
default 1.0 = 100%

ambient

0 or 1, default 0
ambient sounds have no 3d 'position' and may be stereo
non-ambient (positional) sounds are positioned on the object and must be mono

value-range

2 numbers, currently used only for day/night sound effects.
midnight is 0.5, midday = 0.0 or 1.0
where the numbers are not the same, this sets the start and end times for the sound to play
default 0,0 (off)

trigger

currently used only for levers. the sound doesn't play until the trigger message happens

nostartdelay

0 or 1, default 0
if not set, the sound will have a short delay before playing, this stops flanging

(flanging = really nasty sound caused when several copies of the same sound are played at once)

dayloop, daysingle, morning, night, toggle

These have no function in Trainz and have only been put in for user reference. 
Note: Single word only. Do not use a space.

Content Creation Guide Table of Content

Paint Shed Guide