# BT BLACKBOARD LOGGING

*Log any blackboard keys through service or task. Log messages only if value changes*

***

## 🖼️ Node Overview

<figure><img src="https://1894265510-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2MlvUNOxZQqS2bQU0OML%2Fuploads%2FjTImhKoDA8c1R4iilv6n%2FBTDebugOverview.png?alt=media&#x26;token=b4144d42-f9ea-41f6-a59f-619059de9b9f" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="202.60003662109375">Node Type</th><th width="348">Menu Path</th><th>Executes</th></tr></thead><tbody><tr><td><strong>Print String (Task)</strong></td><td><code>Behavior Tree → Tasks → Print String</code></td><td><strong>Once</strong>, when the task starts.</td></tr><tr><td><strong>Print String (Service)</strong></td><td><code>Behavior Tree → Services → Print String</code></td><td><strong>Every tick</strong> (default 0.1 s).</td></tr></tbody></table>

Key capabilities:

* Print **any Blackboard key** in *screen*, *log*, or **3D world**.
* **Unique messages are logged only when they change** (keeps logs clean for logs viewer and output logs).

***

## ⚙️ Configurable Fields

<table><thead><tr><th width="186.79998779296875">Property</th><th>Description</th></tr></thead><tbody><tr><td><strong>Caller Name</strong></td><td>Optional prefix (e.g., <code>[OnSeePlayer]</code>).</td></tr><tr><td><strong>Print BBKey</strong></td><td>Blackboard key to display.</td></tr><tr><td><strong>Text Color</strong></td><td>Colour for on‑screen text.</td></tr><tr><td><strong>Text Duration</strong></td><td>How long on‑screen text stays visible.</td></tr><tr><td>Key</td><td>Key to replace or stack messages</td></tr><tr><td><strong>Log Severity</strong></td><td><code>Info</code>, <code>Warning</code>, or <code>Error</code>.</td></tr><tr><td><strong>Print to World</strong></td><td>Enables <code>DrawDebugString</code>.</td></tr><tr><td><strong>Text Location</strong></td><td>Print above <strong>Actor</strong> or a custom <strong>Vector</strong>.</td></tr><tr><td><strong>Interval</strong></td><td>Interval of logging in service node</td></tr></tbody></table>

***

## 🧠 How Logs Work

* **Service** node samples the key every tick; **Task** prints once executed.
* The system **logs only when the key’s value changes**.
* Destinations: project log files, *LogsViewer*, on‑screen, and/or in‑world.

> ⚠️ Values are skipped only in the logs but can still be rendered on‑screen for continuous visual feedback.

***

## 🔄 Example Use Cases

* Visualise the `TargetActor` position in world space.
* Highlight state transitions such as `EnemyState: Alert → Combat`.
* Log once when `ShouldAttack` flips from `false` → `true`.

***
