Special Profile

(used by SpecialEncounterManager)

Overview

A Special Profile defines rules for spawning rare or high-impact encounters (special enemies, minibosses, scripted threats).

It works with the SpecialEncounterManager, which evaluates conditions and spawns specials only when rules are satisfied.

This is how you implement encounters like:

  • Left 4 Dead’s Special Infected (e.g., Hunter, Smoker, Tank)

  • Payday’s Cloakers, Bulldozers, or Shields

  • Boss events or ambushes triggered by game state

Properties

Property
Description

Max Simultaneous Specials

Global cap on how many special encounters can be alive at once.

Minimum Gap Seconds

Global cooldown between any special spawns.

Rules (List)

Ordered rules. First valid rule will attempt to spawn. Each rule includes:

Name

Friendly label, shown in the inspector.

Spawn Entry

Which enemy/prefab to spawn.

Max Alive

Per-rule cap of how many can exist at once.

Cooldown Seconds

Delay after a successful spawn before this rule can trigger again.

Eval Every Seconds

How often this rule is checked.

Step Range (Min/Max)

Only valid between certain intensity steps (links to Intensity Profile).

Min Pressure

Minimum global “pressure” required (–1 = ignore).

Min Avg Player HP

Minimum average player HP required (–1 = ignore).

Distance Range (Min/Max)

Must spawn within this distance band from the player.

Require No LOS

If true, spawn point must be hidden from player line-of-sight.

Spawn Tag

Optional filter for spawn zones (e.g., "Flank", "Behind").

How to Use

  1. Create a Profile

    • Right-click in Project → Create → Runtime Spawner → Special Profile.

  2. Assign It

    • Attach a SpecialEncounterManager to your scene.

    • Assign the Special Profile in the inspector.

  3. Add Rules

    • Each rule describes when and where a special can spawn.

    • Add multiple rules for variety (e.g., Flankers, Snipers, Tanks).

  4. Test

    • Play the game and observe special spawns.

    • Adjust step ranges and cooldowns to balance frequency and difficulty.


Example Rules

  • Rule 1: "Flanker" – Spawns a fast melee enemy if player HP < 70%, step 1–3.

  • Rule 2: "Tank" – Spawns a miniboss every 120s, only if pressure > 50, step 2+.

  • Rule 3: "Sniper" – Spawns at long range, requires LOS block, step 1+.


Notes

  • Rules are evaluated top-to-bottom. First passing rule will trigger.

  • Combine with an Intensity Profile for dynamic pacing. For example:

    • Early game = no specials.

    • Mid-game = occasional ambush.

    • Endgame = constant pressure from multiple specials.

Also see:

Special Encounter Manager

Last updated