Create a free account to remove all ad content.

Author Topic:  [Blueprint] CCTV Control Panel  (Read 390 times)

0 Members and 1 Guest are viewing this topic.

muD

  • Legendary Member
  • *
  • Posts: 1177
    • View Profile
[Blueprint] CCTV Control Panel
« on: December 31, 2014, 08:57:37 AM »
CCTV Control Panel

A Proximity detecting CCTV Panel.
This gadget lets you know which zones the players are in and which camera to view them on.
It automatically updates in real-time and accounts for multiple players.


The Scripts

This scriptwork can be used in any world type.
Adjust the coordinates & texture id of the buttons to suit.
Note: Replace all forward slashes with backslashes. The forum board doesn't display the backslash.

Spoiler for Scripts:
Script 1:
CCTV/Zone1/Enter
-Run when player enters the zone

Code: [Select]
1. History [CCTV/Zone1/Active]
2. SetTexture [x,y,z] [#]  (enter the coords of Zone1's cam button, and select the texture id for Green)
3. Commit


Script 2:
CCTV/Zone1/Exit
-Run when player exits the zone

Code: [Select]
1. History [CCTV/Zone1/Active] [decrease]
2.
3. If
4.   HasHistory [CCTV/Zone1/Active] [<] [1]
5. Then
6.   SetTexture [x,y,z] [#]  (enter the coords of Zone1's cam button, and select the texture id for Red)
7.   Commit


To add more button support:
-Copy both scripts to New Scripts
-Edit the script & history names from Zone1 to Zone2.
-Edit the [x,y,z] coordinates to button 2's position.
-Set Zone2 to execute both new scripts

Can be modified to:
-Display how many players are in the zone.
-Remove the buttons for zones with no activity.

Suggestions:
Instead of using zones to run the scripts, use a scriptblock & a proximity detector to power it on/off.
This will allow you to specify exactly which targets to detect.