Teardown

Teardown

Not enough ratings
Using the Fire Alarm System in your own Map
By _TheMarCraft_
Usage of the Fire Alarm System by _TheMarCraft_
   
Award
Favorite
Favorited
Unfavorite
General
Thank you for downloading my Fire Alarm System. In this document I will explain you how to use my System and implement it in your Own Map.

IMPORTANT!
Please remember to mention me at least in your Steam Workshop page!
The modification from the Code is allowed but you are not allowed to upload a single Version from the system without the Map!
You are not allowed to pass off the system as your own work!

About the Fire Alarm System
The Scripts are written in Lua
The System supports German and English with audio and text
You can easily implement this in your own Map
The Api is also really easy to use
Implementation of the System in your Map
Project Setup
  • Subscribe to my Fire Alarm System on Steam
  • Make a local Copy of my Fire Alarm System in Teardown

  • After that to your Explorer and open the Teardown Mods folder Usually:
    C:\Users\<YourUsername>\Documents\Teardown\mods\FireAlarmSystem\
  • Copy the Folder ‘firealarm’ into your Map Folder

Setup in your Map
Create a group
  • Create a script The file Parameter is ‘MOD/firealarm/main.lua’
    • Create a polygon trigger with the tag Area (required)
    • Add somewhere one instance with the file: ‘MOD/firealarm/objects/tablet.xml’ (required)
    • Add somewhere one instance with the file: ‘MOD/firealarm/objects/miniTablet.xml’ (required)
    • Add Smoke detectors -> Create instances with the file: ‘MOD/firealarm/objects/smokedetector.xml’
    • Add Alarm Buttons -> Create instances with the file: ‘MOD/firealarm/objects/alarmButton.xml’
    • Add Sirens -> Create instances with the file: ‘MOD/firealarm/objects/sirene.xml’
    • Add Fire doors -> Create instances with the file: ‘MOD/firealarm/objects/exampleFireSlidingDoor.xml’ or ‘MOD/firealarm/objects/exampleFireDoor.xml’
    • Add Alarm doors -> Create instances with the file: ‘MOD/firealarm/objects/exampleAlarmDoor.xml’
Using own Models
Smoke detector
• Create a script element with the file: ‘MOD/firealarm/smokedetector.lua’
• Add your Vox model
• Add a light with the tag ‘press’

Serene
• Create a script element with the file:
‘MOD/firealarm/sirene.lua’
• Add your first Vox model e.g. for the Serene Case
• Add a joint for spinning with the tag ‘joint’
• Add your second Vox model
• Add two lights with the tag ‘light’ for the first and ‘light2’ for the second

Alarm button
• Create a script element with the file:
‘MOD/firealarm/alarmButton.lua’
• Add your Vox model for the button with the tag ‘interact=<e.g.Alarm>’
• Add a light with the tag ‘press’

Fire door
• Create a script element with the file:
‘MOD/firealarm/firedoor.lua’
• Add your door Vox
• Add joints with the tag ‘firedoor’ and the type ‘hinge’ and set the Limits

Fire door sliding
• Create a script element with the file:
‘MOD/firealarm/firedoor.lua’
• Add your door Vox
• Add joints with the tag ‘firedoor’ and the type ‘prismatic’ and set the Limits

Alarmdoor
• Create a script element with the file:
‘MOD/firealarm/firedoor.lua’
• Add your door Vox
• Add joints with the tag ‘firedoor’ and the type ‘hinge’ or ‘prismatic’ and set the Limits

There are also example Objects in the MOD/firealarm/objects folder
API Usage
If you want to control the fire system with another script you can use the following methods:
SetBool("firesystem.alarm", <true|false>)
Enable or Disable the Fire Alarm

SetBool("firesystem.alarmButton", <true|false>)
Enable or disable the Alarm Button Alarm

SetBool("firesystem.alarmDoor", <true|false>)
Enable or disable an Door Alarm

SetBool("firesystem.test.door", <true|false>)
Enable or disable the door test Alarm

SetBool("firesystem.test.alarm", <true|false>)
Enable or disable the test Alarm

SetBool("firesystem.terminal.broken", true)
Trigger a loud error Alarm

SetBool("firesystem.reset", <true|false>)
Force a system reset

SetBool("firesystem.firedoor", <true|false>)
Open or Close the fire doors

SetBool("firesystem.mute", <true|false>)
Mute the Alarm

SetBool("firesystem.alarmButton.light", <true|false>) SetBool("firesystem.smokedetector.light", <true|false>) SetBool("firesystem.test.smokedetector.light", <true|false>) SetBool("firesystem.test.button.light", <true|false>) SetBool("firesystem.test.sirene.light", <true|false>)
Enable or disable lights from alarm system objects

Of course, you can get the state of these methods with
GetBool("firesystem.<name>")
That's it
If you still have questions or I had forgot something, write me on Discord (themarcraft) or write an email to me (kontakt@themarcraft.de)

I hope you enjoy my script and have fun with it ;-)