Page 1 of 1

AI Honk

Unread postPosted: Wed Oct 22, 2014 10:20 am
by aksingha
Hi,
How can i make an AI train honk while crossing another train, arriving at station and before reaching a level crossing?

Re: AI Honk

Unread postPosted: Wed Oct 22, 2014 11:12 am
by artimrj
If you figure out how, you will be my new hero!

Re: AI Honk

Unread postPosted: Wed Oct 22, 2014 12:23 pm
by BNSFdude
Isn't that hard, I would suppose. I'd do it like how Matt Florack did with MSTS. Distance triggered sound event.

Re: AI Honk

Unread postPosted: Wed Oct 22, 2014 12:46 pm
by aksingha
Would love to have this feature in RW...We really need a HERO :D

Re: AI Honk

Unread postPosted: Wed Oct 22, 2014 7:50 pm
by PapaXpress
Trigger the scenario lua to call the horn control?

Re: AI Honk

Unread postPosted: Thu Oct 23, 2014 1:15 am
by aksingha
PapaXpress wrote:Trigger the scenario lua to call the horn control?

Do you know how to? I do not have any knowledge of lua script !*don-know!*

Re: AI Honk

Unread postPosted: Thu Oct 23, 2014 11:17 am
by PapaXpress
I know how I would go about writing the code, I just am tight on time.

Re: AI Honk

Unread postPosted: Thu Oct 23, 2014 12:12 pm
by aksingha
PapaXpress wrote:I know how I would go about writing the code, I just am tight on time.

!!*ok*!! That's great....Please do work on it, If you get time later..It would be awesome to have such option in Railworks..

Re: AI Honk

Unread postPosted: Fri Oct 31, 2014 2:59 am
by Kali
I'm not remotely up to date on scenario scripting, so if people say you can trigger AI sounds from there then I will believe them ( and ask how! ).

There is another tool introduced with 2015, whistle boards - which are unsurprisingly meant to trigger whistles/horns. Unfortunately they don't work properly yet ( they had to be pulled out of one of the recent dlc ) and I'm not sure if they work as scenario objects, but it's worth some investigation because they'll probably get fixed.

Sadly the AI doesn't read custom signal messages so that sort of simple marker approach is also out. The hardest part of your query is honking when crossing another train - if you can do that from the scenario script, which presumably you can based on proximity, that sounds like a useful piece of code to put in a generic scenario scripting library. Presumably if markers and trains are interchangeable in the scenario script you can use the same code for all of it.

Re: AI Honk

Unread postPosted: Fri Oct 31, 2014 3:23 am
by aksingha
I think that some scenarios in the Munich-Augsburg route have this feature. I am not sure though, played it some time ago.