AI horn

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • esteban
    New Member
    • Feb 2017
    • 6

    #1

    AI horn

    (Poor English below, please)

    ¡Hola! Estoy programando bocinas para trenes AI. Uso el "ScalabiltyGroup 0". El problema es que, las bocinas programadas para AI, también suenan cuando yo manejo la locomotora. Antes, la solución era tener dos archivos eng y dos archivos sms. Player y AI, respectivamente. Ahora, con el uso de los Timetables, yo necesito que haya un único archivo eng. Yo no sé si, revisar cuestiones sobre los sonidos, pueda ser una sugerencia interesante, para OpenRails.
    Desde ya, muchas gracias.
    Esteban Litwinczuk, desde Argentina.

    Hello! I'm programming horns for AI trains. I use the "ScalabiltyGroup 0". The problem is that the horns programmed for AI also sound when I drive the locomotive, as player. Before, the solution was to have two eng files and two sms files. Player and AI, respectively. Now, with the use of Timetables, I need to have a single eng. I do not know if, reviewing questions about the sounds, may be an interesting suggestion, for OpenRails.
    Thank you very much.
    Esteban Litwinczuk, from Argentina.
  • csantucci
    Senior Member
    • Nov 1999
    • 856
    • Torino, Italy.

    #2
    AI trains don't use ScalabiltyGroup 0. They use the same ScalabiltyGroup that is used for player trains. This way they have access to the full palette of variables and discrete triggers.
    I use this stream to solve the problem, even if it is not perfect:
    Stream (
    Skip (**** ORTS AI: horn at train meet ***************************************)
    Priority ( 7 )
    Triggers ( 4
    Discrete_Trigger ( 45 DisableTrigger ( 3 ) )
    Discrete_Trigger ( 66 DisableTrigger ( 3 ) )
    Variable_Trigger ( Distance_Dec_Past 70.0 PlayOneShot ( 1

    File ( "x_trcentro_loud_long.wav" -1 )

    SelectionMethod ( RandomSelection ) ) )
    Variable_Trigger ( Distance_Dec_Past 35.0 DisableTrigger ( 3 ))

    )
    VolumeCurve(
    SpeedControlled
    CurvePoints ( 5
    -100.0 1.0
    -2.0 1.0
    0 0.0
    2.0 1.0
    100.0 1.0
    )
    Granularity ( 0.1 )
    )
    )

    I am however thinking at a cleaner solution, providing a new discrete trigger that is enabled when the train is an AI train (or vice-versa).
    sigpic

    Comment

    • esteban
      New Member
      • Feb 2017
      • 6

      #3
      Whats it's the "45" and "66" values?

      Comment

      Working...