Role Testers
Role testers are trigger volumes that check the role of players inside them. The classic use is a traitor tester: a player steps into a booth, a button activates the tester, and the map turns on the result lights.
Tester Pieces
-
The trigger volume that checks occupants against a configured role
-
Lights, doors, sounds, or effects driven by passed and failed results
-
Player controls that activate, toggle, lock, or reset the tester
-
A simple bundled traitor tester you can use as a reference or starting point
TTT Trigger Role Tester
TTT Trigger Role Tester checks the current occupants of its trigger volume against Match Role. If at least one occupant matches, it fires Targets On Passed. If at least one occupant does not match, it fires Targets On Failed.
Setup
- Create the tester booth, chamber, platform, or marked standing area.
- Add a
GameObjectfor the tester volume. - Add
TTT Trigger Role Tester. - Resize the trigger
BoxColliderso it covers the area where players should stand. - Set
Match Role. For a normal traitor tester, leave it asTraitor. - Set
Starts ActiveandActivate Modefor how the tester should be used. - Wire a button, trigger, or other sender to activate the tester.
- Wire
Targets On PassedandTargets On Failedto result indicators.
Keep the test area controlled
A role tester can evaluate more than one occupant. If a matching player and a non-matching player are inside at the same time, it can fire both passed and failed outputs. Classic tester rooms should force one player into the test volume at a time.
Match Settings
| Option | Use |
|---|---|
Match Role |
The exact role/team that counts as a match. Default is Traitor. |
Require Alive |
Only living players count as matches. Leave this enabled for normal testers. |
Contact Include / Include / Exclude |
Occupant filters inherited from trigger volumes. Leave the defaults alone unless you are deliberately building a special tester. |
Activation
Role testers are trigger-style tools. They only evaluate while active, or when an input makes them active.
| Option | Use |
|---|---|
Starts Active |
Starts active on round start or reset. Useful for always-on scanners. Disable it for a button-operated tester. |
Starts Locked |
Starts locked until another tool sends Unlock. |
Activate Mode |
Controls what Activate does: enable, toggle, or activate for a timed duration. |
Activate Duration Seconds |
Duration for timed activation. |
Inputs
| Input | Behavior |
|---|---|
Start / Open |
Turns the tester active. |
Stop / Close |
Turns the tester inactive. |
Activate |
Uses Activate Mode. |
Toggle |
Flips between active and inactive. |
Lock / Unlock |
Prevents or allows future activation. |
For most authored testers, prefer Start, Stop, Activate, and Toggle.
Result Indicators
Targets On Passed and Targets On Failed are result outputs. For a normal traitor tester with Match Role set to Traitor:
| Output | Meaning |
|---|---|
Targets On Passed |
A traitor was detected. |
Targets On Failed |
A non-traitor was detected. |
Why is an Innocent showing up as failing?
The output names are from the tester's point of view: passed means "matched the configured role," not "innocent passed the test."
Clean Indicator Wiring
A simple two-light tester usually uses TTT Enable Target receivers on the indicator lights.
| Event | Target | Input |
|---|---|---|
Targets On Passed |
Traitor/red indicator | Start |
Targets On Passed |
Innocent/green indicator | Stop |
Targets On Failed |
Innocent/green indicator | Start |
Targets On Failed |
Traitor/red indicator | Stop |
Targets On Empty |
Both indicators | Stop |
Targets On Deactivated |
Both indicators | Stop |
Be explicit with indicator inputs
Tester result outputs send Pass and Fail internally. Most indicator receivers do not need to know those words, so set the map link Input to Start or Stop when wiring lights, sounds, doors, or effects.
Buttons
One-Shot Tester
Use this when pressing a button should check whoever is currently inside the booth.
- Set the role tester
Starts Activeto off. - Set
Activate ModetoTimed. - Add a
TTT Buttonnear the tester. - Wire the button's main output to the role tester with input
Activate. - Wire result outputs to the indicators.
Toggle Tester
Use this when a button should turn the tester on and off.
- Set the role tester
Starts Activeto off. - Set the button
ModetoToggle. - Wire
Targets On Toggled Onto the tester with inputStart. - Wire
Targets On Toggled Offto the tester with inputStop. - Wire
Targets On Deactivatedor the button's off output to clear the indicators.
Outputs
| Output | Use |
|---|---|
Targets On Passed |
Fires when an evaluation finds at least one occupant matching Match Role. |
Targets On Failed |
Fires when an evaluation finds at least one occupant not matching Match Role. |
Targets On Entered / Targets On Exited |
Fires when a valid occupant enters or exits while active. |
Targets On Occupied / Targets On Empty |
Fires when the trigger becomes occupied or when the last valid occupant leaves. |
Targets On Activated / Targets On Deactivated |
Fires when the tester starts or stops being active. |
Targets On Locked / Targets On Unlocked |
Fires when the tester is locked or unlocked. |
Included Prefab
The project includes a simple traitor tester prefab at prefabs/objects/tools/traitortester.prefab. It is useful as a starting point or wiring reference, especially if you want to see a complete tester volume, button, and indicator setup together.
Treat it as an example, not a rule. For a real map, check the trigger size, button placement, indicator reset behavior, and whether the tester room can be abused by multiple players standing inside at once.
Testing Checklist
- Test with a traitor, an innocent, and a detective when possible.
- Confirm
Targets On PassedandTargets On Failedmean what your lights imply. - Make sure result indicators clear when the player leaves or the tester turns off.
- Test what happens if two players enter the volume at the same time.
- Run a round reset and confirm the tester starts active, inactive, locked, and cleared exactly as intended.