Some replies:
Here an excerpt of an .sms file that uses some of the triggers:
Stream (
Skip (**** ORTS AI: bell entering station ***************************************)
Priority ( 7 )
Volume ( 1.1 )
Triggers ( 7
Initial_Trigger ( DisableTrigger ( 3 ) )
Discrete_Trigger ( 320 EnableTrigger ( 3 ) )
Discrete_Trigger ( 324 StartLoopRelease ( 1
File ( "x_hhp_bell1.wav" -1 )
SelectionMethod ( RandomSelection )
)
)
Variable_Trigger ( Speed_Dec_Past 0.1 ReleaseLoopReleaseWithJump ( ) )
Discrete_Trigger ( 321 DisableTrigger ( 3 ))
Discrete_Trigger ( 322 DisableTrigger ( 3 ))
Discrete_Trigger ( 323 DisableTrigger ( 3 ))
)
VolumeCurve(
SpeedControlled
CurvePoints ( 5
-100.0 1.0
-2.0 1.0
0 1.0
2.0 1.0
100.0 1.0
)
Granularity ( 0.1 )
)
)
Stream (
Skip (**** ORTS AI: bell exiting station ***************************************)
Priority ( 7 )
Volume ( 1.1 )
Triggers ( 9
Initial_Trigger ( DisableTrigger ( 3 ) )
Discrete_Trigger ( 320 EnableTrigger ( 3 ))
Discrete_Trigger ( 325 EnableTrigger ( 4 ))
Variable_Trigger ( Speed_Inc_Past 0.1 StartLoopRelease ( 1
File ( "x_hhp_bell1.wav" -1 )
SelectionMethod ( RandomSelection )
)
)
Variable_Trigger ( Speed_Inc_Past 5.0 ReleaseLoopReleaseWithJump ( ) )
Variable_Trigger ( Speed_Inc_Past 5.0 DisableTrigger ( 4 ))
Discrete_Trigger ( 321 DisableTrigger ( 3 ))
Discrete_Trigger ( 322 DisableTrigger ( 3 ))
Discrete_Trigger ( 323 DisableTrigger ( 3 ))
)
VolumeCurve(
SpeedControlled
CurvePoints ( 5
-100.0 1.0
-2.0 1.0
0 1.0
2.0 1.0
100.0 1.0
)
Granularity ( 0.1 )
)
)
First stream sound requires that the related locomotive is the AI train lead to enable trigger 324, which in turn is triggered when the locomotive is at 150 meters (hardcoded) from the station. In this case the bell starts playing. The sound stops when the loco reaches 0 speed. The last triggers disable trigger 324 when the locomotive becomes part of a player train, or is no more a lead locomotive.
Second stream sound again requires that related locomotive is the AI train lead to enable trigger 32, which in turn is triggered as soon the locomotive restarts from a station stop. In this case again the bell starts playing. The sound stops when the loco reaches a speed of meters per second (this can be modified in the .sms file). The last triggers disable trigger 325 when the locomotive becomes part of a player train, or is no more a lead locomotive.
Both streams might be modified to play the horn instead of the bell, or to play both.
The triggers may be used also to enable other sounds specific to AI trains, e.g. a horn blast or a bell sound at every restart from zero speed, as well as specific brake sounds and so on.
I'm sorry, but at the moment triggers 324 and 325 are not implemented for timetables. I haven't yet tested how the other triggers work with timetable mode. Maybe some adjustments are needed.