Choose your operating system:
Windows
macOS
Linux
The security camera Blueprints seen throughout the level are designed to interact with the player when in Play mode. During play, they will pan back and forth in a search pattern. When the green search cone overlaps a pawn, the light turns red and the camera begins to track player movement. It continues to track the player until the player moves out of range. Then, after a few seconds, it returns to searching.
This Blueprint is also responsible for handling a scene capture, which is used later in the security screen Blueprint.
Of particular importance in this Blueprint is the use of a Blueprint Interface. A Blueprint Interface works like a conduit, allowing functionality to be shared across multiple other Blueprints. Any Blueprint that implements a given Interface automatically inherits all of the functionality that is a part of that Interface. In this way, you can create sophisticated networks of Blueprints that can all work together toward a given goal.
In this example, the Security Alarm Interface acts as a data conduit, allowing us to share functionality with both the Alarm Beacon and the Door Blueprints, specifically, whether the alarm is on or off.
Camera Blueprint
The Camera Blueprint serves as the heart of the alarm system, for it is this Blueprint that interacts with the player and causes the alarm to sound. Along with implementing an Interface for Blueprint communication, the Camera also makes use of a Timeline node. This is a special node built to handle animation.
A Timeline can contain any number of animated tracks, whose data can then be sent out as an output, used to drive any number of effects. In this case, the Timeline is used to drive the scanning rotation of the camera as it pans back and forth.
Blueprint Setup
The Components List, Construction Script, and Event Graph for this Blueprint perform the following tasks:
Blueprint Aspect |
Purpose |
---|---|
Components List |
|
Construction Script |
The Construction Script performs the following tasks:
|
Event Graph |
The Event Graph performs the following tasks when a Pawn enters the view cone:
When the Pawn exits the view cone:
|
Editable Variables
The camera has the following exposed properties:
Property |
Purpose |
|
---|---|---|
Scanning |
||
Camera Max Yaw |
The maximum angle of side-to-side scanning. |
|
Camera Pitch |
Sets the pitch angle for the camera. This variable has a 3D widget activated and can be manipulated in the viewport. |
|
Spot Light |
||
Light Attenuation |
Sets the attenuation radius for the Spot Light Component. |
|
Spotlight Brightness |
Sets the brightness value for the Spot Light Component. |
|
Light Color Alarm On |
The color of the Spot Light when the alarm is active. |
|
Light Color Alarm Off |
The color of the Spot Light when the alarm deactivated. |
|
Targeting |
||
Test Material Alarm Settings |
Toggles the alarm state for testing and adjustment of the alarm colors. |
|
Blueprint Interface |
||
Blueprint To Trigger Alarm Array |
This array contains a list of all objects that need to receive updates about whether the alarm is on or off. |
|
Render Target |
||
Scene Capture Texture |
This holds the Render Target texture that will be used for the security camera monitors. |
|
Scene Capture View Distance |
Sets the max view distance for the Scene Capture Component. Lower this to improve performance. |
Alarm Blueprint
The Alarm Blueprint serves as a visual cue that the player has tripped the alarm by stepping in front of the security camera. When activated, it seems to change from green to red, and a beacon light begins spinning. It continues to do this until the alarm deactivates.
The alarm is turned on and off by receiving messages from the Security Alarm Blueprint Interface, which is implemented by the camera, the door, and the alarm.
Blueprint Setup
The Components List, Construction Script, and Event Graph for this Blueprint perform the following tasks:
Blueprint Aspect |
Purpose |
---|---|
Components List |
|
Construction Script |
The Construction Script performs the following tasks:
|
Event Graph |
The Event Graph performs the following tasks: When we receive a signal from the alarm Interface:
|
Editable Variables
The alarm has the following exposed properties:
Property |
Purpose |
---|---|
Light Rotation Speed |
The speed at which the alarm beacon spins. |
Test Alarm Material Settings |
This Boolean forces the alarm to be on for testing purposes. Note that the beacon will not spin if not in Play mode. |
Door Blueprint
The Door is set up such that it remains open so long as the alarm is not engaged. The moment the alarm is triggered, however, the doors are animated such that they slam shut and will not reopen until the alarm ends. It is important to note that Timelines are used to animate the doors. In fact, there are 2 separate Timelines - one to open the doors and another to close them. This allows the doors to open at one speed and close at another.
The door motion is actually triggered by receiving a signal from the Security Alarm Blueprint Interface, which is implemented by the camera, the door, and the alarm.
Also interesting about the door setup is that the door Timelines do not animate the doors directly. Instead, the Timelines each output a single float value, which is then used to interpolate between two vector locations - an "open" location and a "closed" location.
Blueprint Setup
The Components List, Construction Script, and Event Graph for this Blueprint perform the following tasks:
Blueprint Aspect |
Purpose |
---|---|
Components List |
|
Construction Script |
The Construction Script performs the following tasks:
|
Event Graph |
The Event Graph performs the following tasks when we receive a signal from the alarm Interface:
|
Editable Variables
The door has the following exposed properties:
Property |
Purpose |
---|---|
Door Open Width |
Sets the end location for the doors as they open. This gets mirrored to the opposite door. |
Door Left Size |
Sets the scale for the left door. |
Door Right Size |
Sets the scale for the right door. |