# 7. Boss Battle Pitfalls Part of [[Boss Battles with Phases]]. Prev: [[6. Worked Example Three-Phase Boss]]. ## Phase entered twice `TryAdvancePhase` that walks the list and calls `EnterPhase` every damage tick will restart the child machine (and the sting) on every hit below the threshold. Compare against `_phase` and only enter when it *changes*. Do not enter Death and Phase 3 in the same frame. ## Intro and gameplay both alive If the Director **Hold**s the last Cinemachine shot and you never `Stop()`, the Brain never returns the gameplay camera. If `playOnAwake` is on, the intro can start before the brain is ready and the `stopped` callback may fire before you subscribe. Turn it off; play from code. ## Signals you skip past Without **Retroactive** emitters (or an explicit `IntroFinished` call in `Skip`), a skip can leave the gate open and the boss invulnerable. The skip path must produce the same end state as a natural finish ([[4. Timeline Intros and Phase Transitions]]). ## Swapping `playableAsset` on one Director Bindings are on the Director, for a specific asset's tracks. Two assets on one Director is a common way to lose the boss Animation binding. Use two Directors, or test the swap on an empty scene before you teach it. ## Mid-telegraph hazard disable A phase change that `SetActive(false)`s a trap mid-tell can leave a hitbox on, or can hide the tell and still fire. Traps must turn their hitbox off in `OnDisable` / `ForceSafe`. See [[Hazards, Traps and Key-Door Puzzles]]. ## Telegraph after the hit If `Hitbox.Activate` runs in `Enter` of the attack state, you have no tell. The active window starts when the tell *ends*. ## NavMesh and knockback A heavy player finisher that shoves the boss off the mesh will leave `NavMeshAgent` fighting the transform. Either keep knockback small on bosses, use a larger baked area, or `Warp` back after the shove ([[NavMesh in Unity 6 (AI Navigation 2.x)]], [[4. Hit-Stop Knockback and Feedback]]). ## Invulnerability leaks Intro invulnerability that never clears (callback missed) is a soft-lock. So is a coup-de-grace wait with no cue and no legal finishing attack assigned. Always have a timeout or a debug key in a teaching scene that forces `IsInvulnerable = false` and `_coupReady = true`. ## "Greatest boss battle" If the intro is forty seconds, the arena is unbaked, and Phase 3 is unfinished the day before class, you have illustrated Level 11's **why not** section. Cut the sting, keep the tells, ship three simple phases. ## Sources - `PlayableDirector` (6000.5): https://docs.unity3d.com/6000.5/Documentation/ScriptReference/Playables.PlayableDirector.html - [[Timeline Basics]] - [[Enemy AI State Machine]]