Overview
This section provides complete, copy-paste ready workflows for common game mechanics. Each workflow includes the required assets, components, and visual scripting setup.
Poison DoT (Damage Over Time)
A classic poison effect that deals periodic damage, stacks up to 5 times, and scales damage with stack count.
1. Create Category: "Debuffs"
- • Type:
Debuff - • Color:
#FF4444(red)
2. Create Effect: "Poison"
- • Category: Debuffs
- • Tags:
dot, poison - • Duration:
5 seconds - • Has Tick:
✓ - • Tick Interval:
1 second - • Tick On Apply:
✓ - • Stacking Mode:
RefreshAndStack - • Max Stacks:
5 - • Scale With Stacks:
✓ - • Cleanse Type:
Poison
3. Visual Scripting: Deal Damage on Tick
- Add Trigger to Player with Event: On Any Effect Ticked
- Add Condition: Has Effect → Poison
- Add Action: Change Attribute → Health, Subtract 10
With Scale With Stacks enabled, 5 stacks = 50 damage per tick
Shield Buff
A protective shield that absorbs damage and has a cooldown to prevent spam.
1. Create Effect: "Shield"
- • Category: Buffs (Type: Buff)
- • Duration:
10 seconds - • Stacking Mode:
Refresh - • Has Cooldown:
✓ - • Cooldown Duration:
30 seconds - • Cooldown Starts On Apply:
✓ - • Apply VFX: Shield bubble prefab
- • Apply Sound: Shield activation sound
2. Shield Logic (Code Example)
// On damage received, check for shield
var manager = GetComponent<StatusEffectManager>();
if (manager.HasEffect(shieldDefinition))
{
// Absorb damage, maybe remove shield
manager.RemoveEffect(shieldDefinition);
return; // No damage taken
}
// Apply normal damage...Stun Effect
A crowd control effect that prevents actions, with brief immunity after to prevent chain-stunning.
1. Create Category: "Crowd Control"
- • Type:
CrowdControl - • Color:
#FFAA00(orange) - • Max Concurrent:
1(only one CC at a time)
2. Create Effect: "Stun"
- • Category: Crowd Control
- • Duration:
2 seconds - • Stacking Mode:
None - • Cleanse Type:
Magic
3. Grant Immunity After Stun
- Add Trigger with Event: On Specific Effect Expired → Stun
- Add Action: Add Immunity (Effect) → Stun, 3 seconds
4. Disable Actions While Stunned
// In your action handler
if (manager.HasEffectCategoryType(EffectCategoryType.CrowdControl))
{
Debug.Log("Cannot act while stunned!");
return;
}Boss Immunity Profile
Make boss enemies immune to crowd control while still allowing damage-over-time effects.
1. Create ImmunityProfile: "Boss"
- • Immune Categories:
Crowd Control - • Immune Tags:
stun, root, silence
2. Assign to Boss
- Select Boss GameObject
- Find StatusEffectManager component
- Assign "Boss" profile to Immunity Profile field
3. Show "IMMUNE!" Feedback
- Add ImmunityFeedback component to Boss
- Configure floating text style
- Triggers automatically when effects are blocked
Stat Modifiers (GC2 Stats)
Create buffs that modify GC2 Stats while active. Requires GC2 Stats module.
1. Create Effect: "Strength Potion"
- • Category: Buffs
- • Duration:
60 seconds - • Stat Modifiers:
- — Stat: Strength, Type: Constant, Value: +10
2. Setup StatsBridge
- Add StatsBridge component to character (alongside StatusEffectManager)
- Ensure character has GC2 Traits component
- Define
GC2_STATSin Player Settings
Healing Aura Zone
Create a zone that continuously heals allies who stand in it.
1. Create Effect: "Regeneration"
- • Category: Buffs
- • Duration Mode:
Permanent - • Has Tick:
✓ - • Tick Interval:
1 second
2. Create Healing Zone
- Create empty GameObject at zone location
- Add StatusEffectAura component
- Effect: Regeneration
- Radius:
5 - Target Mode:
AlliesOnly - Remove On Exit:
✓
3. Heal on Tick
- Add Trigger with Event: On Any Effect Ticked
- Add Condition: Has Effect → Regeneration
- Add Action: Change Attribute → Health, Add 5
Cleanse System
Create different cleanse abilities that remove specific types of effects.
Effect Setup
Assign appropriate Cleanse Types to your effects:
- • Poison, Bleed →
Poison - • Curse, Hex →
Curse - • Arcane Debuffs →
Magic - • Wounds, Exhaustion →
Physical - • Boss Debuffs →
Undispellable