| Next revision | Previous revision |
| interactive_logic [2026/05/04 00:42] – created frank_lee_smith | interactive_logic [2026/05/14 22:58] (current) – frank_lee_smith |
|---|
| | ''DelaySeconds'' | Delays delivery of this link. | Use for timed sequences. | | | ''DelaySeconds'' | Delays delivery of this link. | Use for timed sequences. | |
| |
| ===== Common input names ===== | ===== Input Names ===== |
| |
| ^ Input ^ Typical meaning ^ | ^ Input ^ Typical meaning ^ |
| ==== Door setup ==== | ==== Door setup ==== |
| |
| - Select the door object. | 1. Select the door object. |
| - Add ''TTT Linear Mover''. | 2. Add TTT Linear Mover. |
| - Set ''MoveDelta'' to the local-space offset from closed to open. | |
| - Set ''OpenDuration'' and ''CloseDuration''. | {{::linearmover.png?600|}} |
| - Decide whether it should ''StartsOpen'' or ''StartsLocked''. | |
| - Give the object a stable name, for example ''door_secret''. | 3. Set MoveDelta to the local-space offset from closed to open. |
| | |
| | {{::sbox-dev_haj4aw5a5x.gif?800|}} |
| | |
| | 4. Set OpenDuration and CloseDuration (Or don't, for default speed). |
| | |
| | {{::openclose.png?800|}} |
| | |
| | 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 ==== | ==== Button setup ==== |
| |
| - Select the button object. | 7. Select the button object. |
| - Add ''TTT Button''. | 8. Add TTT Button. |
| - Set ''Mode'' to ''Press'', ''Hold'', or ''Toggle''. | 9. Set Mode to Press, Hold, or Toggle. |
| - Set ''HintText'' for the prompt shown to players. | |
| - Add a link under ''TargetsOnActivated'': | |
| * ''TargetName'' = ''door_secret'' | |
| * ''Input'' = ''Open'' | |
| |
| For a toggle door, use ''Input'' = ''Toggle''. For a button that closes the door, use ''Input'' = ''Close''. | {{::pressmode.png?800|}} |
| | |
| | 10. Set HintText for the prompt shown to players (Or ignore for default). |
| | |
| | 11. Add a link under TargetsOnActivated: |
| | |
| | {{::targets.png?800|}} |
| | |
| | |
| | ==== 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. ==== |
| | |
| | {{::tagname.png?600|}} |
| |
| ==== Optional polish ==== | ==== Optional polish ==== |
| * Add a paired mover or partner name for double doors. | * Add a paired mover or partner name for double doors. |
| |
| ===== Tutorial: hinged door ===== | ===== Tutorial: traitor button activates a trap ===== |
| |
| Use ''TTT Rotating Door'' for hinged doors and rotating panels. | Use ''TTT Role Button'' for traitor/detective-only buttons. These will display a floating panel to that role. |
| |
| - Add ''TTT Rotating Door'' to the door object. | |
| - Place the object origin at the hinge, or create a small hinge helper object and assign it as ''PivotTarget''. | |
| - Set ''TargetRotation''. The default is a 90-degree yaw. | |
| - Enable ''OpenAwayFromActivator'' when the door should swing away from the player. | |
| - Wire a button, trigger, or direct use to ''Open'', ''Close'', ''Toggle'', ''Lock'', or ''Unlock''. | |
| |
| ===== Tutorial: traitor button activates a trap ===== | |
| |
| Use ''TTT Role Button'' for traitor/detective-style map actions. | {{::rolebutton.png?400|}} |
| |
| ==== Role button setup ==== | ==== Role button setup ==== |
| - Add ''TTT Role Button'' to the button object. | - Add ''TTT Role Button'' to the button object. |
| - Set ''RoleName'' to ''Traitor'', ''Detective'', or another allowed display team. | - Set ''RoleName'' to ''Traitor'', ''Detective'', or another allowed display team. |
| - Set ''Description'' and optional ''SubText''. | - Set ''Description'' and optional ''SubText'' (The top and bottom fields on the image above). |
| - Use ''StartsLocked'' for traps that should be armed later. | - Use ''StartsLocked'' for traps that should be armed later. |
| - Use ''RemoveOnUse'' for one-shot traps. | - Use ''RemoveOnUse'' for one-shot traps. |
| * ''Input'' = ''Stop'' | * ''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. | **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 ===== | ===== Tutorial: elevator with call buttons ===== |
| |
| Use path tools when movement has more than two positions. | Use path tools when movement has more than two positions (e.g. Elevator with 3+ floors). |
| |
| ==== Build the path ==== | ==== Build the path ==== |