Sound alarm when the train is full.

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
Triskac
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Mar 13, 2021 10:49 pm
Contact:

Sound alarm when the train is full.

Post by Triskac »

Hey!

I have an artillery train that is loading in my base with artillery shells plus some ammo for turrets defending the artillery outpost. I would like the speaker alarm to play a sound once the train is completely loaded, so I can hop in and take train to the outpost. I have never used the circuit network so I am confused as how to do it. Any ideas?

Thanks:)

Trific
Fast Inserter
Fast Inserter
Posts: 147
Joined: Thu Dec 31, 2020 7:57 pm
Contact:

Re: Sound alarm when the train is full.

Post by Trific »

Place a programmable speaker, and hook it up with a red or green wire to the train stop. Set the train stop to "Read train contents". Set the speaker to sound the alarm when "artillery shell" = # (however many the train can carry). I will warn you the alarms can be loud so you probably want to adjust the volume. And you'll probably want one of the train conditions to be "passenger present".

Serenity
Smart Inserter
Smart Inserter
Posts: 1000
Joined: Fri Apr 15, 2016 6:16 am
Contact:

Re: Sound alarm when the train is full.

Post by Serenity »

Hook up a wire to the train stop and set it to "read train contents".

To truly only play a sound only once instead of constantly it gets more complicated however. You need a edge detector/pulse generator for that to turn the constant signal into a pulse:



The combinators outputting the green squares detect if the two kinds of ammos are loaded. Only counting artillery is easier, but you may also want to count the turret ammo separately to be sure.
Then that constant signal is turned into a single A signal when that happens. You can leave away those other combinators to play a sound all the time. However that can get annoying. Or turn off the sound and only show the alarm visually, which is usually fine.

Triskac
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Mar 13, 2021 10:49 pm
Contact:

Re: Sound alarm when the train is full.

Post by Triskac »

Thanks a lot, works like charm. I've put a switch to turn the annoying alarm off easily once it sets off :D

Post Reply

Return to “Gameplay Help”