Ai Not Use Horns!!

Discussion in 'General Discussion' started by fra.bel211, Feb 15, 2023.

  1. fra.bel211

    fra.bel211 New Member

    Joined:
    Jan 24, 2023
    Messages:
    13
    Likes Received:
    1
    Train Simulator AI trains cannot use their horns. I think allowing them to do that would add a little more immersion to the game.
    Has anyone solved this?
    Thanks everyone!!!
     
  2. 390001

    390001 Well-Known Member

    Joined:
    Jan 18, 2018
    Messages:
    2,352
    Likes Received:
    1,584
    Armstrong powerhouse iirc have scripted some scenarios to use AI horns iirc
     
  3. KTL_Rob Powell

    KTL_Rob Powell Well-Known Member

    Joined:
    Aug 18, 2018
    Messages:
    231
    Likes Received:
    296
    Sadly it is a lot of work to get AI to sound their horns. I think one of the Huddersfield career scenarios has a pacer sound its horn at a worksite as you get near it but I'm not sure. It's something I may look at doing on my freeware scenarios in the future though..
     
    • Like Like x 3
  4. Doomotron

    Doomotron Well-Known Member

    Joined:
    Oct 24, 2018
    Messages:
    3,861
    Likes Received:
    4,431
    It is definitely possible with scripting, my friend did it. I believe it's also possible to have voice acting if you want, but that was even more complicated although the last time said friend tried was a few years ago.
     
  5. Reef

    Reef Well-Known Member

    Joined:
    Jul 27, 2018
    Messages:
    2,806
    Likes Received:
    1,817
    • Like Like x 2
  6. 390001

    390001 Well-Known Member

    Joined:
    Jan 18, 2018
    Messages:
    2,352
    Likes Received:
    1,584
    i know golden goldsmith has AI horns in his scenarios as well as a lot of other stuff i did not even think was possible
     
  7. fra.bel211

    fra.bel211 New Member

    Joined:
    Jan 24, 2023
    Messages:
    13
    Likes Received:
    1
    Hi!
    Wow!!!

    I m quite handy with LUA can you tell me which file to go edit to do this?
    Can I have a test script?
    It is enough for me that horn sounds only on departure from the station!
    Thank you?

    Sorry for the bad English...
     
  8. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,072
    Likes Received:
    3,142
    Not sure why the horn is sounding departing a station?
    Normally in the UK the horn was used to warn people on the track

    Can you imagine a commuter run on the South London or North London where the train stopped every 3-5 mins and the driver sounded the horn at each station - :o
     
  9. ac_freeman

    ac_freeman Active Member

    Joined:
    Jan 26, 2023
    Messages:
    86
    Likes Received:
    112
    What seems like eons ago, when I still spent most of my time writing scenarios, I tinkered with lua scripting to create weather effects such as thunder storms ( I think the scenario should still be on the worksop somewhere ), if I remember correctly the script calls were based on time rather than events or locations, so there might be a way of triggering an AI to sound it's horn at a given time in the scenario.....so to hear it you would need to synchronise the player train and AI train times to hear the sound. I am not an expert in this area so there may be other possibilities.....the scripting is quite fiddly to get right ( or was for me ), pulled a fair bit of my hair out getting it to work but the the thunder storm effects turned out ok, if a little over-dramatic :)

    Andy
     
    • Like Like x 1
  10. Johnno124

    Johnno124 Active Member

    Joined:
    Dec 8, 2016
    Messages:
    238
    Likes Received:
    226
    UK is far from the only country in the world with trains. Here in Melbourne, Australia the horn is used upon departure from Station or Signal at Danger (Warning that the train is about to move), or on approach to a crossing/worksite. It is also used to acknowledge lineside workers through a construction site.
     
  11. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,072
    Likes Received:
    3,142
    Never said it was.
    And like in Melbourne the drivers in the UK sound their horn when passing a signal at danger, approaching a crossing or worksite.
    But they don't sound the horn when departing from a station unless there are staff on the track ahead.
    And that applies on most lines in mainland Europe where I have travelled extensively.
     
  12. inversnecky

    inversnecky Well-Known Member

    Joined:
    Dec 26, 2020
    Messages:
    2,252
    Likes Received:
    843
    Yes, ran one on the Fife Circle line the other day, where an AI train sounds its horn on departure from the station at the beginning.
     
  13. 390001

    390001 Well-Known Member

    Joined:
    Jan 18, 2018
    Messages:
    2,352
    Likes Received:
    1,584
    adam haigh scenario a good friend of mine
     
  14. SJA

    SJA Active Member

    Joined:
    Jun 2, 2020
    Messages:
    289
    Likes Received:
    244
    Only other scenario I can think of is when there is a whistle board upon departing a station when there is a crossing not far away.

    But the whistle board is the clue and has rules about when it can/should be used which drivers will have been trained in.
     
  15. Smokebox

    Smokebox Active Member

    Joined:
    Dec 10, 2016
    Messages:
    105
    Likes Received:
    101
    Most of my locos automatically blow their whistles, when acting as AI, when they start, stop or (in some cases) back up.
     

Share This Page