Team Spartan Cookies & Milk Forums

Full Version: Alarm Sounds SF
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This SF plays alarm sounds. It is designed to be easily deployed around a ship, relying on a single wirelink (no it doesn't, it seems it breaks with a wirelink, which is a shame - now uses 5 inputs for each alarm) to another SF that tells it what alarms to play. It's easily modifiable and should be relatively simple to understand. Comments are plastered all around the code to make suggestions.

It requires another chip to tell it when to play alarm sounds, e.g. when hull is below 25%. This is simple to do. Simply calculate the hull percentage, add an if then end statement to check whether an alarm should play and make it an output, and simply wire this chip to it, making sure to change the alarm name in the code if you have an output that isn't one of the 5 in the my code, for example, "TargettingAlarmOn", etc, at lines 42, 48, 54, 60 and 66.

Available in my shared or below:

https://pastebin.com/2PJBGnna