Help with horn trigger

fant_autentico

Well-known member
In a route that I am doing, I want the steam locomotives to whistle automatically at certain points.
I downloaded a horn trigger from DLS but I can't get it to work, I don't know anything about triggers and I hope someone can help me.


Thanks in advance

Javier
 
My whistle signs work for all three modes of operation (DCC, cab, AI):

<kuid:324956:100315> Whistle Sign W w/Horn Seq V3
<kuid:324956:100317> Whistle Sign W w/Horn Seq V3 (L)

They need to be placed a certain distance, based on posted speed, from the crossing. The script will automatically adjust itself if the train is going slower than the posted speed. The distance is listed in the description if meters and feet. The trigger radius needs to be set to 1 or the distance measured set to the leading edge of the trigger radius.

V2 of these two signals works only for AI trains so if you want to mix and match, you might want to download both. They are on DLC.
 
My whistle signs work for all three modes of operation (DCC, cab, AI):

<kuid:324956:100315> Whistle Sign W w/Horn Seq V3
<kuid:324956:100317> Whistle Sign W w/Horn Seq V3 (L)

They need to be placed a certain distance, based on posted speed, from the crossing. The script will automatically adjust itself if the train is going slower than the posted speed. The distance is listed in the description if meters and feet. The trigger radius needs to be set to 1 or the distance measured set to the leading edge of the trigger radius.

V2 of these two signals works only for AI trains so if you want to mix and match, you might want to download both. They are on DLC.

Thank you very much, I will download them and see if I can get them to work :confused:
 
BTW, if you have a specific type of whistle sign you would prefer to use, message me with the KUIDs and I'll see about modifying them to act like mine. I'll need to get the original authors permission etc., etc., but shouldn't be a problem.
 
One thing to remember, when I used automatic horns is that they have to be facing the correct way. The picture has to face the oncoming loco (may have changed, have not used since I purchased TRS19 but that is how it was on TANE).
 
BTW, if you have a specific type of whistle sign you would prefer to use, message me with the KUIDs and I'll see about modifying them to act like mine. I'll need to get the original authors permission etc., etc., but shouldn't be a problem.

They work very well, it's really what I was looking for and I appreciate the offer to modify them but it is not necessary. :D
As you said it depends on the speed and the radius of the curves.
I am curious to know the reason why the locomotives whistle 4 times.:eek:


Thanks again for this work of yours.

Regards

Javier
 
They work very well, it's really what I was looking for and I appreciate the offer to modify them but it is not necessary. :D
As you said it depends on the speed and the radius of the curves.
I am curious to know the reason why the locomotives whistle 4 times.:eek:


Thanks again for this work of yours.

Regards

Javier

I believe that is the standard sequence for a crossing: two blasts, one short blast, and one long blast as the loco is passing the crossing.

The whistle_sign.gs script can be modified to create any sequence you like. This is the section you would want to change:

// long
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(2.0f);

// long
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(2.0f);

// short
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(2.0f);

// lean on it!
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
Sleep(0.15f);
SendMessage(theTrain, "loco", "horn");
 
I believe that is the standard sequence for a crossing: two blasts, one short blast, and one long blast as the loco is passing the crossing.

The whistle_sign.gs script can be modified to create any sequence you like. This is the section you would want to change:

Good clarification. At the moment I do not modify anything but I keep your instructions. :)

Regards
 
BTW, if you have a specific type of whistle sign you would prefer to use, message me with the KUIDs and I'll see about modifying them to act like mine. I'll need to get the original authors permission etc., etc., but shouldn't be a problem.

You could also make surveyor only versions that way any non-scripted whistle post could be used.
 
You could also make surveyor only versions that way any non-scripted whistle post could be used.

Thought about doing that. I would need (want) to change the image to be more like a trigger image. I'll work on it in my spare time - oh, wait, I'm retired. I have plenty of spare time. :hehe:
 
Thank you for folks for another Excellent educational Thread!

I always thought the Horn Trigger worked no matter what, but that was my ignorant assumption. :eek:

At least now, I understand much better how this thing really works....:)

As I have told new members in the past, this Forum is a wealth of information, lots to read and learn. ;)

I bid all a good night. :wave:
 
I am curious to know the reason why the locomotives whistle 4 times.:eek:

That is the standard horn sequence for American and Canadian (maybe Mexican) railroads. It may be different in Spain, because the railroad administrative bodies vary from country to country on how they regulate horn signals.

The train horn sequence is played relative to the speed of the train and the distance to the crossing (and wherever the whistle post is), so if a train was traveling 60 mph (~100 km/h), it would take about half a mile to reach the crossing. After the two longs are whistled, the short is whistled, then the last long is held until the train reaches a sufficient distance from the crossing (~50 feet), touches the crossing or passes over the crossing. Keep in mind they do this with the bell ringing to cover the space between the horn blasts. If there is a quiet zone, there will be speakers along the tracks that play the horn sequence over and over until the train passes, with the train bell still ringing.

Hope this helped! :D
 
You could also make surveyor only versions that way any non-scripted whistle post could be used.

Just uploaded this. It will take a day or so for approval.

Invisible_Horn_Sequence_V2.cdp
Date Received: 24th Aug 2022, 23:11:31 (AEST)
Upload Mode: Standard
Waiting to be Processed.

This would be used with non-scripted whistle posts as you suggested.
 
My whistle signs work for all three modes of operation (DCC, cab, AI):

<kuid:324956:100315> Whistle Sign W w/Horn Seq V3
<kuid:324956:100317> Whistle Sign W w/Horn Seq V3 (L)

They need to be placed a certain distance, based on posted speed, from the crossing. The script will automatically adjust itself if the train is going slower than the posted speed. The distance is listed in the description if meters and feet. The trigger radius needs to be set to 1 or the distance measured set to the leading edge of the trigger radius.

V2 of these two signals works only for AI trains so if you want to mix and match, you might want to download both. They are on DLC.

These whistles are great. I tried it out on my route, I laid out 12xc44 locos as a distance guide front loco at road crossing, place a W sign at the rear loco and then went into player mode. The loco laid on the horn several times right up to the crossing; I will move them up two locos and this will put them sounding off through the crossing.

Great asset, thanks for the work you did.
 
Well, finally got that straightened out. I tried to update <kuid:324956:100327> and it got rejected because there was a mix up in the kuids. I did an upgrade (instead of cloned new version) and it has been approved.

Invisible Whistle w/Horn Seq V2
<KUID2:324956:100327:1>
Uploaded: 26th Aug 2022

This would be used in conjunction with non-scripted whistle posts. As far as the blast sequence goes, that is hard-coded in the gs script. The script is not encrypted so anyone can edit the whistle_sign.gs script for local use on their routes.

Enjoy.
 
The script is not encrypted so anyone can edit the whistle_sign.gs script for local use on their routes.

Enjoy.

Just use notepad? Never seen a gs file before.

**Ah, I guess it is a google apps script, new one to me. Will leave it alone.**
 
The gs scripts look like they are written in Java or Javascript (maybe C++, idk). I use notepad++ because it gives me the Java language formatting of the scripts.
 
Back
Top