Table of Contents

Interactive Logic Tutorial

This page shows how to wire common TTT map interactions with map I/O. The examples are intentionally small. Once the patterns make sense, you can combine them into larger traps, puzzle rooms, traitor testers, elevators, secret doors, and environmental events.

The map IO mental model

A sender fires an output. Each output contains one or more map links. A map link finds one or more receivers, then sends an input name and optional payload. The receiver decides what that input means.

Example:

TTT Button
  TargetsOnActivated
    TargetName = secret_door_1
    Input      = Open

When the button activates, the object named door_secret receives Open.

Field What it does When to use it
Target Direct component reference. Best for scene-authored maps, because Facepunch's dropper tool actually works.
TargetName Finds GameObjects by exact name. All matching names receive the signal. Matching is case-insensitive and trims whitespace. Made with Hammer in mind but works either way.
TargetTag Sends the signal to all GameObjects with the authored tag. Best for broad one-to-many events.
Input Input name sent to the receiver. Blank usually forwards the sender's default input. Use when you want Open, Start, Stop, GoTo, etc.
Payload Optional string data. Required for some path-mover commands such as GoTo or CallOrDepart.
DelaySeconds Delays delivery of this link. Use for timed sequences.

Input Names

Input Typical meaning
Activate Generic action or default behavior for that object, if it has one (For example, DoorRotating will open when sent this).
Press / Release Button-style press state.
Start / Stop Generic on/off behavior. Preferred for lights, effects, triggers, and state receivers.
Open / Close Door and mover-friendly aliases for start/stop-style behavior.
Toggle Flip the current state.
Lock / Unlock Prevent or allow future activation.
GoTop / GoBottom Binary mover aliases for open/close-style movement.
GoTo Move a path mover to a named point or zero-based point index. Uses Payload.
CallOrDepart Elevator-style call/send-away behavior. Uses Payload.
Next / Previous Move a path mover to a neighboring path point.
Pause / Resume / Reverse / Reset Path mover runtime controls.
Enter / Exit / Occupied / Empty Trigger occupancy outputs.
Pass / Fail Role tester outputs.

Tutorial: button opens a sliding door

Use this for ordinary sliding doors, secret panels, trap shutters, or lifts that only need two positions.

Door setup

1. Select the door object.
2. Add TTT Linear Mover.

3. Set MoveDelta to the local-space offset from closed to open.

4. Set OpenDuration and CloseDuration (Or don't, for default speed).

5. Decide whether it should StartsOpen or StartsLocked.

6. Give the object a unique name (like secret_door_1, so on and so forth).

This process works similarly for rotating doors.

Button setup

7. Select the button object.
8. Add TTT Button.
9. Set Mode to Press, Hold, or Toggle.

10. Set HintText for the prompt shown to players (Or ignore for default).
11. Add a link under TargetsOnActivated:

You should not use all 3 Target fields like in the example above. We are demonstrating that the GameObject can be identified by name directly, with a tag or by using the dropper tool.

Optional polish

Tutorial: traitor button activates a trap

Use TTT Role Button for traitor/detective-only buttons. These will display a floating panel to that role.

Role button setup

  1. Add TTT Role Button to the button object.
  2. Set RoleName to Traitor, Detective, or another allowed display team.
  3. Set Description and optional SubText (The top and bottom fields on the image above).
  4. Use StartsLocked for traps that should be armed later.
  5. Use RemoveOnUse for one-shot traps.

Trap receiver examples

To start a hurt volume:

TTT Role Button
  TargetsOnActivated
    TargetName = trap_hurt_volume
    Input      = Start

To fire a timed hurt trigger, set the hurt trigger's ActivateMode to Timed and wire the button with Input = Activate.

To teleport players in a room:

TTT Role Button
  TargetsOnActivated
    TargetName = trap_teleport_volume
    Input      = Activate

A role button activated through map IO still needs a real player activator who passes the same role and range checks as direct use.

Tutorial: trigger turns on a light

Use TTT Trigger Box for simple occupancy logic, then use TTT Enable Target as the receiver.

Receiver setup

  1. Add TTT Enable Target near the light, particle system, sound emitter, component, or GameObject you want to control.
  2. Set TargetKind to Component or GameObject.
  3. Assign TargetComponent or TargetObject.
  4. Name the receiver object light_room_warning_enable.

Trigger setup

  1. Add TTT Trigger Box to a trigger volume.
  2. Leave Include as player for ordinary player occupancy logic.
  3. Add a link under TargetsOnOccupied:
    • TargetName = light_room_warning_enable
    • Input = Start
  4. Add a link under TargetsOnEmpty:
    • TargetName = light_room_warning_enable
    • Input = Stop

Important: Avoid disabling the same GameObject, or an ancestor of the GameObject, that contains the TTT Enable Target. Once the receiver disables itself, later signals may not reach it. It's alright to disable Components on the same GameObject.

Tutorial: elevator with call buttons

Use path tools when movement has more than two positions (e.g. Elevator with 3+ floors).

Build the path

  1. Create a GameObject for TTT Path Track.
  2. Add child objects for each floor and give each one a TTT Path Point.
  3. Set each point's PointName, for example basement, lobby, and roof.
  4. Use Order when hierarchy order is not enough.
  5. Enable ClosedLoop on the track only when the last point should connect back to the first.

Build the platform

  1. Add TTT Path Mover to the elevator platform.
  2. Assign Track directly or use TrackName.
  3. Set StartPoint if it should begin somewhere other than the first point.
  4. Set MoveSpeed and MovementCurve.
  5. Decide whether QueueRequestedStops should queue calls while the elevator is busy.

Add floor call buttons

For a button that always sends the platform to the roof:

TTT Button
  TargetsOnActivated
    TargetName = elevator_platform
    Input      = GoTo
    Payload    = roof

For a call/send-away button at the lobby:

TTT Button
  TargetsOnActivated
    TargetName = elevator_platform
    Input      = CallOrDepart
    Payload    = lobby

On a two-point track, CallOrDepart means “come here if away, go to the other point if already here.” On tracks with three or more points, set DepartureTarget or DepartureTargetName on the path point.

Tutorial: role tester room

Use TTT Trigger Role Tester for traitor testers, filtered chambers, or trap logic that branches by occupant role.

  1. Add TTT Trigger Role Tester to the chamber volume.
  2. Set MatchRole to the role/team considered a pass.
  3. Keep RequireAlive enabled when only alive players should count.
  4. Wire TargetsOnPassed to a green light, safe door, sound, or relay.
  5. Wire TargetsOnFailed to a red light, alarm, trap, or lock.

Mixed-role occupancy can fire both pass and fail outputs, so design tester rooms with that behavior in mind.

Common mistakes

Useful debug commands

Command or ConVar Use
t.db.use 1 Logs direct-use rejection and activation details for pressable objects.
t.db.triggers 1 Logs trigger occupant filtering and behavior.
t.db.resetregistry 1 Logs reset capture and reset behavior.