reflect-bothCombat Effect Zone

The EnemyMassesCombatEffectZone component creates area-of-effect zones that periodically apply status effects or healing to agents within their radius. It supports cyclic activation, faction filtering, VFX/audio feedback, and animated radius visualization.


Features

  • Effect Modes: Apply status effects (buffs, debuffs, DoTs, CC) or instant healing

  • Cyclic Activation: Configure active/inactive cycles for pulsing zones

  • Faction Filtering: Target all factions, specific factions, or exclude factions

  • VFX Integration: Spawn effects on activation, deactivation, while active, and on agent presence

  • Audio Cues: One-shot sounds and looping audio for activation states

  • Animated Radius Line: Optional LineRenderer with pulse animation and fade effects

  • Editor Gizmos: Visual preview of zone radius with effect-based coloring


Quick Setup

  1. Create an empty GameObject in your scene

  2. Add the EnemyMassesCombatEffectZone component (or use GameObject > Enemy Masses > Combat > Combat Effect Zone)

  3. Set the Radius for the effect area

  4. Choose your Effect Mode (StatusEffect or InstantHeal)

  5. Configure the effect type and values

  6. Play the scene!

circle-info

By default, zones start automatically on scene start. Disable Start On Start for manual control via script.


Settings Reference

Controller

Setting
Description
Default

Crowd Controller

Optional controller reference (uses Instance if empty)

-

Zone

Setting
Description
Default

Radius

Radius of the effect zone

6

Timing

Setting
Description
Default

Start On Start

Activate automatically on scene start

true

Start Delay

Seconds before first activation

0

Active Duration

How long the zone stays active (0 = always)

3

Inactive Duration

Time between activations

10

Apply Interval

How often to apply effects while active

1

circle-info

Set Active Duration to 0 for a zone that's always active (no cycling).

Effect Settings

Setting
Description
Default

Effect Mode

StatusEffect or InstantHeal

StatusEffect

Effect Type

Status effect type to apply

Regeneration

Effect Duration

Duration of the status effect

5

Effect Value

Value (damage/heal per tick, or multiplier)

5

Effect Tick Interval

Tick interval for DoT/HoT effects

1

Instant Heal Amount

Heal amount (InstantHeal mode only)

5

Filtering

Setting
Description
Default

Faction Filter Mode

AllFactions, OnlyListedFactions, or ExcludeListedFactions

AllFactions

Faction Filter

List of EnemyCrowd factions for filtering

Empty


Effect Modes

Status Effect Mode

Applies a status effect to all valid agents in the radius:

Status effects persist for their configured duration, even after the agent leaves the zone.

Effect Type
Category
Example Use

Regeneration

Buff

Healing shrine

Poison

DoT

Toxic swamp

Burn

DoT

Lava field

Slow

Crowd Control

Ice zone

Stun

Crowd Control

Lightning trap

Weaken

Debuff

Cursed ground

DamageBuff

Buff

War banner

Instant Heal Mode

Directly heals agents without applying a status effect:

circle-info

Instant healing is applied immediately each interval, making it useful for powerful but infrequent heals.


Cyclic Activation

Zones can pulse on and off for interesting gameplay:

Configuration
Behavior

Active Duration = 3, Inactive Duration = 10

Zone pulses: 3s on, 10s off

Active Duration = 0, Inactive Duration = any

Zone always active (no cycling)

Active Duration > 0, Inactive Duration = 0

Activates once, then stops


Faction Filtering

Control which agents are affected by the zone:

AllFactions (Default)

All agents within radius are affected, regardless of faction.

OnlyListedFactions

Only agents from factions in the Faction Filter list are affected:

ExcludeListedFactions

All agents EXCEPT those from factions in the list are affected:

circle-info

Use OnlyListedFactions with a player faction for friendly healing zones. Use ExcludeListedFactions with player factions for enemy-only hazards.


VFX Settings

Setting
Description
Default

Start VFX

Played when zone activates

None

End VFX

Played when zone deactivates

None

Active VFX

Played while zone is active

None

Active VFX Interval

Seconds between active VFX spawns (0 = once)

0

Presence VFX

Played when agents are in radius

None

Presence VFX Interval

Seconds between presence VFX spawns

0

VFX Scale

Scale multiplier for all zone VFX

1

VFX Offset

Position offset for VFX spawns

(0, 0, 0)

VFX Timing


Audio Settings

Audio Cue Properties

Each audio cue has these settings:

Property
Description
Default

Clip

AudioClip to play

-

Volume

Playback volume

1

Pitch Variation

Random pitch variation

0.05

Spatial Blend

2D (0) to 3D (1) blend

1

Min Distance

Full volume distance

1

Max Distance

Audible range

50

Max Concurrent

Limit simultaneous plays

0 (unlimited)

Available Cues

Cue
Trigger

Start Sound

One-shot when zone activates

End Sound

One-shot when zone deactivates

Active Loop Sound

Looping while zone is active

Presence Loop Sound

Looping while agents are in radius


Radius Line Renderer

Visualize the zone radius with an animated LineRenderer:

Basic Settings

Setting
Description
Default

Radius Line Renderer

LineRenderer component to use

-

Radius Line Segments

Circle approximation segments

64

Radius Line Height

Vertical offset

0.02

Update Line Renderer In Editor

Update in edit mode

true

Update Line Renderer Every Frame

Update during play

true

Animation Settings

Setting
Description
Default

Animate Radius Line

Enable pulse animation

true

Animate Radius Line In Editor

Animate in edit mode

false

Radius Line Pulse Speed

Animation speed

1.2

Radius Line Alpha Pulse

Alpha pulse intensity

0.2

Radius Line Width Pulse

Width pulse intensity

0.15

Radius Line Fade Duration

Fade in/out time

0.25

Setting Up the Line Renderer

  1. Add a LineRenderer component to the zone GameObject (or a child)

  2. Configure the line material and width

  3. Assign the LineRenderer to Radius Line Renderer

  4. The component will automatically:

    • Draw a circle matching the zone radius

    • Animate alpha and width with a pulsing effect

    • Fade in when the zone activates

    • Fade out when the zone deactivates

circle-info

Use an additive or transparent material for the LineRenderer for best visual results.


Runtime Control

Properties

Property
Type
Description

IsActive

bool

True if zone is currently in active phase

IsRunning

bool

True if zone has been started

Methods


Scripting Examples

Basic Damage Zone

Healing Zone for Player Faction Only

Trap Zone with Trigger

Dynamic Zone Radius

Cyclic Buff Zone


Editor Gizmos

The component displays visual feedback in the Scene view:

Visual
Description

Wire Sphere

Zone radius outline

Filled Sphere

Semi-transparent fill showing zone area

Automatic Gizmo Colors

Colors are automatically chosen based on effect type:

Effect Category
Color

Buff / Instant Heal

Green

Debuff / DoT

Red

Crowd Control

Yellow

Use Gizmo Color to override with a custom color.


Common Use Cases

Poison Swamp

Healing Fountain

Fire Trap (Pulsing)

Slow Field

Stun Trap (Single Activation)


Performance Tips

  1. Apply Interval: Increase for large zones or many agents (0.5s - 2s)

  2. VFX Intervals: Don't spawn VFX every frame; use intervals of 0.5s or more

  3. Radius Line Segments: Lower values (16-32) are fine for smaller zones

  4. Update Every Frame: Disable if zone position never changes


  • EnemyMassesCrowdController - Core crowd management

  • Status Effect System - Status effect types and categories

  • RTS UI Components - Status effect display UI

Last updated