Security Camera Base Tutorial

This tutorial presumes you already know the basics of the editor and the entities.

These cameras will spawn enemies if you stay in the field of view of the camera for a certain amount of time. This tutorial shows how to build them using touchfields and triggers. It also goes on to briefly explain how to add advancements like disabling them, adding sounds and making panning cameras. Also included is a map containing all you need including a model I made for the camera. You can download it from here . Extract into your Serious Sam directory. The files will be placed in the correct directories.

What you need for the basic camera:

Before we set up anything place the following in a map.

A touchfield

Before adding the brush to your touchfield manipulate it, inserting vertices (right click on brush) where required. This will be the field of view for the camera. Name this 'Touchfield field of view'. By manipulating the brush you can create the effect of camera seeing through doorways etc.

4 triggers

Trigger 1 name this 'Trigger in view'

Trigger 2 name this 'Trigger wait'

Trigger 3 name this 'Trigger out of view '.

Trigger 4 name it 'Trigger alarm'.

An Enemy Spawner

This will simply spawn enemies when triggered by trigger 4. Name this 'Enemy spawn alarm'. Set up this with whichever and how many enemys you wish.

The aim of this is that if you leave the touchfield within 3 seconds, Trigger 4 (the alarm) is de-activated before it is triggered by Trigger 2 (the wait)

This is achieved by setting up the the entities as below:


EnterTarget: Trigger in View

This 'primes' the alarm when you enter

ExitTarget: Trigger out of view

This turns off 'Trigger alarm' before triggered by 'Trigger wait'

Exit check time: 0.2

This is how often the player is checked for being in the touchfield.  0.2 seemed to work ok.  Lower would too, but whether things would slow up the engine I don't know

Trigger in view

EventType Target01: Activate event

This activates 'Trigger Alarm' since it may have been deactivated by leaving the touchfield previously

Target01: Trigger Alarm

Target02: Trigger wait

This triggers the 2 second wait before the alarm can go off

Trigger wait

Target01: Trigger alarm

This is the 2 second wait before the alarm can go off

Wait: 2

Trigger out of view

EventType Target01: deactivate event

This disables the alarm trigger so 'Trigger in view' can't trigger it

Target01: Trigger alarm

Trigger alarm

Target01: Enemy spawn alarm

This spawns the enemies

And thats it, job done. All that's left to do is add the camera itself. I've made a simple model for that and you can download it with the tutorial map. Drag a model holder into position and in it's properties set the model to seccam2.mdl (you'll find it in the models/sambdam directory). You can then play with the other settings to adjust its size etc.

Just incase you don't know how to use the enemy spawner: Create another room not touching the current one and put an enemy in it. In the settings for the enemy check the 'Template' option. Then in the Enemy spawner entity set the 'Template Target' to the enemy you just placed. One problem with the camera is that if you return in view of it while the 'Trigger Wait' is still counting 2 seconds and stay there when it finishes the alarm will go off, eventhough you may not have remained in view for 2 whole seconds.

Now to add some interaction..

Adding sounds

This is a good idea because it can alert the player when they come into view of a camera and alert them when they have set it off.

To achieve this you need to add 2 sound holders named 'Sound alarm warning' and 'Sound alarm' and another trigger, named 'Trigger reset alarm'. You will also need to add some new settings to the previous triggers.

Trigger in view

EventType Target03: Start Event

Sets off a warning sound

Target03: Sound Alarm warning

Trigger out of view

EventType02: stop event

Stops the warning sound

Targer02: sound alarm warning

Trigger alarm

Event Type02: Start Event

Sets of the alarm siren

Target02: Sound alarm

Target03: Trigger reset alarm

Triggers the new trigger below

Trigger reset alarm

EventType01: Stop Event

After the alarm goes off this will stop all sounds after 3 seconds

Target01: sound alarm warning

EventType02: Stop event

Target02:sound alarm

Wait: 3

Again i've made a couple of sounds you can use and you can download them with the tutorial map. Then in the soundholder properties set the sound to warning.wav or alarm.wav (you'll find it in the sounds/sambdammed directory)

Deactivating the alarm

This can be done in several ways (damage, hitting a switch are two useful ones)

When deactivating you should set it up so that the touchfield, the 'Trigger alarm' trigger and any sounds are deactivated. This is because that the de-activating event can occur while the player is still inside the touchfield.

Panning cameras

I have tried this but it doesn't work with touchfields. For some reason the collision event for a touchfield only works in one way. You have to touch it, if it touches you, nothing happens. Instead I used 2 overlapping WatchPlayer? entities. You set up the 'owned target' property of one to 'Trigger in view' and you set up the other to 'Trigger out of view', for this second entity you also need to set 'close event type' to 'don't send event' and 'far event type' to 'trigger event'. You can then parent the WatchPlayer? entities to a moving brush to get the effect of a panning camera.

  • Add Audio to a Security Camera System
  • Is Someone Watching You? Free Guide on How to Find Hidden Cameras Spying on You
  • Security camera technology breakthrough
  • Motion sensitive security camera!
  • Network Camera Surveillance Powerhouse Secures Your Property
  • Turn your laptop into a home security system
  • Select and Install a Security Camera
  • Your Web-camera could be spying on you: security firm
  • Security, surveillance camera: How to choose?
  • Security Camera System - Buyers Guide
  • Security camera thief sought
  • Security Camera Product