Elvas Tower: AI train horn honk, american style - Elvas Tower

Jump to content

Posting Rules

All new threads will be started by members of the Open Rails team, Staff, and/or Admins. Existing threads started in other forums may get moved here when it makes sense to do so.

Once a thread is started any member may post replies to it.
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

AI train horn honk, american style Rate Topic: -----

#1 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,996
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 28 December 2020 - 01:50 PM

OR already has the feature of having AI trains honking before a level crossing. This is achieved by adding a line
		ORTSAIHornAtCrossings ( 1 )

after line
		NextActivityObjectUID ( 32768 )

in the activity file.

This generates a single honk of a random duration between 2 and 5 seconds.
However in North America honking before a level crossing is quite more elaborated, and usually has a sequence of long honk - long honk - short honk - very long honk, which I always like to hear.
So I have decided to implement a feature that lets AI trains honk this way before level crossings.
This is achieved by simply modifying the above line to
		ORTSAIHornAtCrossings ( 2 )

Here
Attached File  AIAmHorn.zip (1.14MB)
Number of downloads: 423
I have taken a recording, with the camera at a level crossing and an AI train passing. The sequence plays also in the autopiloted player train.

I have to refine it now, and then I have the intention to insert this feature in the various OR versions.

#2 User is online   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 6,888
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 28 December 2020 - 03:15 PM

Russian railroad signalization instruction contains "-.-" sound sequence, for warning, that the honking train is moving on "wrong" track - i.e. from that direction, that tipycaly no one expect.

#3 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,996
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 02 January 2021 - 05:28 AM

The feature is now available in OR NewYear MG rev.86.

- inserting line
		ORTSAIHornAtCrossings ( 2 )

in .act files after line
		NextActivityObjectUID ( 32768 )

will cause the AI trains to generate a sequence of horn blows before railroad crossings;
- inserting a WP with value of 60021 in a path will cause the AI train to generate a sequence of horn blows after that WP.

#4 User is offline   scottb613 

  • Vice President
  • Group: Status: First Class
  • Posts: 2,973
  • Joined: 06-July 09
  • Gender:Male
  • Location:Downeast Maine (soon)
  • Simulator:ORTS
  • Country:

Posted 02 January 2021 - 08:14 AM

View PostCsantucci, on 02 January 2021 - 05:28 AM, said:

The feature is now available in OR NewYear MG rev.86.

- inserting line
		ORTSAIHornAtCrossings ( 2 )

in .act files after line
		NextActivityObjectUID ( 32768 )

will cause the AI trains to generate a sequence of horn blows before railroad crossings;
- inserting a WP with value of 60021 in a path will cause the AI train to generate a sequence of horn blows after that WP.


Hi Carlos,

FYI - tried the American "2" code - I only get a single blast.

Video Demonstration
https://youtu.be/o_EzywvxZG4

Activity
Attached File  SCO_Act01.txt (4.56K)
Number of downloads: 367

Is there a way to control the distance from the crossing the horn blows start - in my above YouTube example - it seems too close to the crossing.

The "latching bell" stays on forever.

Regards,
Scott

#5 User is offline   scottb613 

  • Vice President
  • Group: Status: First Class
  • Posts: 2,973
  • Joined: 06-July 09
  • Gender:Male
  • Location:Downeast Maine (soon)
  • Simulator:ORTS
  • Country:

Posted 02 January 2021 - 08:19 AM

Hi Carlos,

The revision number of the 86 download link you recently posted still shows 85 inside the downloaded file - could it just be a bad download link ?

Regards,
Scott

#6 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,996
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 02 January 2021 - 08:35 AM

Scott,
you're right. I skipped a step. Please download again.
Thank you for having pointed that out.

#7 User is offline   scottb613 

  • Vice President
  • Group: Status: First Class
  • Posts: 2,973
  • Joined: 06-July 09
  • Gender:Male
  • Location:Downeast Maine (soon)
  • Simulator:ORTS
  • Country:

Posted 02 January 2021 - 08:38 AM

View PostCsantucci, on 02 January 2021 - 08:35 AM, said:

Scott,
you're right. I skipped a step. Please download again.
Thank you for having pointed that out.


Hi Carlos,

Will do - gracias amigo...

;)

Regards,
Scott

#8 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,996
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 25 January 2021 - 01:25 PM

Blueprint https://blueprints.l...n-blow-sequence generated for inclusion in official OR versions.

#9 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,996
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 04 March 2021 - 02:15 AM

This feature is now present in the official Testing and Unstable releases.
There has been a change in the way such pattern must be defined in the activity file.
S, to get the USA horn pattern when an AI train passes a level crossing, following two lines must be added in tne .act file

		ORTSAIHornAtCrossings ( 2 )
		ORTSAICrossingHornPattern ( US )

after line
		NextActivityObjectUID ( 32768 )


This applies also to the OR NewYear MG release starting from rev. 92.

Nothing changes to get the pattern by setting a waiting point with waiting time 60021.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users