Game Creator 2
Enemy Masses includes built-in support for Game Creator 2, allowing you to control crowds using Visual Scripting Actions, Triggers, and Conditions.
Requirements
Game Creator 2 Core
Shooter 2
Melee 2
Setup
The integration has to be manually imported into your project. The package named GC2-Integration is located in Assets/Plugins/EnemyMasses/Integration/
The Demo Scene can be installed through GC2s Install Menu

Design Philosophy & Limitations
You may notice that you cannot directly modify internal properties of Crowd Agents (like health, speed, or state) using generic "Set Property" actions or reflection.
This is by design.
The core architecture of Enemy Masses is built to support Competitive Multiplayer and deterministic simulation. The Enemy Masses base code will over time be increasingly adjusted for a competitive Multiplayer extension. To ensure that thousands of units remain synchronized across clients, all state changes must go through specific command channels rather than direct variable modification.
For example, you cannot simply "Set Health = 100" on an agent. Instead, you must use the Heal Crowd Agents instruction. This ensures the engine can properly validate the change, trigger UI updates, and sync the state to other players.
Always use the provided Enemy Masses Instructions (listed below) to interact with the crowd. These instructions ensure that changes are applied safely and efficiently within the simulation loop.
Why crowd agents don’t use GC2 Melee Skills or Shooter ScriptableObjects
Scale & performance: GC2 Skills/Weapons instantiate VFX/Audio per use. With hundreds or thousands of agents, this would spawn thousands of particle systems, audio sources, and colliders, immediately tanking performance. Enemy Masses uses its own pooled/lightweight combat pipeline to stay performant at swarm scale.
Determinism & networking: Enemy Masses targets Multiplayer. GC2’s runtime graph/Animator-driven effects are not designed for lockstep/authoritative sync across many agents. Enemy Masses keeps combat in a deterministic loop and syncs state via its own instruction path.
Design intent: GC2 is excellent for a handful of characters; Enemy Masses is built for crowds. We intentionally decouple crowd combat from GC2’s skill objects to preserve frame time and netcode stability. Use GC2 for the player or hero characters; let Enemy Masses drive NPC crowds.
Recommended integration pattern
Use Enemy Masses Instructions to affect agents (spawn, damage, heal, status, stances, movement).
For player attacks created in GC2, bridge into Enemy Masses via the provided components (e.g., GC2 Enemy Masses Strike Driver) so the crowd damage uses the lightweight pipeline instead of spawning GC2 VFX/Audio per agent.
Keep GC2 Skills/Shooter scriptable objects for player-facing content; let the crowd remain on Enemy Masses’ combat and VFX/audio systems.
Integration Components
GC2 Enemy Masses Strike Driver
This component bridges Game Creator 2's Melee system with Enemy Masses, allowing your GC2 characters to hit and damage crowd agents during their attack animations.
Setup:
Select your Player or Character prefab.
Add the
GC2EnemyMassesStrikeDrivercomponent.Assign the Character reference (or leave empty to auto-detect).
Settings:
Damage: Base damage dealt to crowd agents.
Strike Radius: How far the attack reaches.
Detection Mode:
Distance: Uses cached agent positions (Performance friendly). Requires
PlayerSkillManagerin the scene.Collider: Uses physics overlaps (More accurate). Requires agents to have colliders.
Respect Strike Phase: If enabled, damage is only dealt during the "Strike" phase of the Melee animation.
One Hit Per Strike: Prevents an agent from taking damage multiple times from a single swing.
Instructions
You can find the Enemy Masses instructions in the Action Editor under the category Enemy Masses.
Spawning
Spawn Enemy Crowd
Spawns a specific faction at a target location.
Controller: The
EnemyMassesCrowdControllerto use.Faction: Select by Index or Name.
Count: Number of agents to spawn.
Spawn Position: World position for the formation center.
Formation: Shape of the spawn (Circle, Box, etc.).
Auto Attack Target: If enabled, newly spawned agents will attack this target.
Auto Destination: If enabled, newly spawned agents will move to this position.
Despawn Enemy Crowd
Removes agents from the scene.
Controller: The
EnemyMassesCrowdControllerto use.Mode:
All Agents: Despawns every agent managed by this controller.
Faction: Despawns only a specific faction.
Agent Indices: Despawns specific agent IDs.
Use Ragdoll: If true, agents die normally. If false, they are removed silently.
Combat
Crowd Melee Strike
Deals damage to all agents within range of a position.
Attacker: The Character performing the attack (used for Melee Phase detection).
Strike Position: Center of the attack (e.g., weapon tip).
Strike Range: Radius of the attack.
Damage: Amount of damage to deal.
Respect Melee Phase: If enabled, only hits during the "Strike" phase of a GC2 Skill.
Crowd Shooter Hit
Detects and damages agents along a shot trajectory. Designed for Shooter Weapons.
Damage: Base damage (can be multiplied by Weapon Power).
Agent Hit Radius/Height: Dimensions of the virtual hitbox for agents.
Allow Piercing: If enabled, shots can pass through multiple agents.
Apply Status Effect
Applies buffs, debuffs, or DOTs to agents.
Target Mode: Single Agent, Radius (AOE), Faction, or All Agents.
Effect Type: Regeneration, Poison, Burn, Stun, Slow, Root, etc.
Duration: How long the effect lasts (0 = permanent).
Value: Strength of the effect (damage per tick, slow amount, etc.).
Remove Status Effect
Removes specific or all status effects.
Removal Mode: Specific Effect, Dispel Negative (Cleanse), Dispel Positive (Purge), or Clear All.
Heal Crowd Agents
Instantly restores health to agents.
Target Mode: Single Agent, Radius (AOE), Faction, or All Agents.
Heal Amount: Amount of health to restore.
Set Crowd Damage Multiplier
Modifies incoming damage multipliers globally or per-agent.
Target Level: Global, Faction, Agent, or Player Target.
Operation: Set, Add, or Multiply.
Value: The multiplier value.
Set Crowd Combat Template
Changes the combat behavior template at runtime.
Combat Template: MeleeSwarm, MeleeQueued, RangedStationary, etc.
Movement & Physics
Crowd Move In Formation
Moves agents to a destination while maintaining formation.
Destination: Target position.
Formation: Shape of the formation (Rectangle, Circle, etc.).
Spacing: Distance between agents.
Use Manual Command: If true, overrides AI combat behavior.
Crowd Navmesh Impulse
Applies a fake-physics impulse (knockback/knockup) while keeping agents on the NavMesh.
Center/Radius: Origin and size of the impulse.
Push Min/Max: Horizontal force.
Lift Min/Max: Vertical force (visual only).
Gravity/Drag: Physics simulation parameters.
RTS & Civil
Set RTS Combat Stance
Sets the stance (Offensive, Defensive, Hold Position) for RTS units.
Target Mode: Selected Agents, Specific Agent, or Faction.
Stance: The new combat stance.
Set RTS Move Formation
Changes the default formation used for RTS move commands.
Set RTS Camera Follow Target
Makes the RTS Camera track a specific object.
Set Crowd Civil Mode
Enables or disables Civil Mode (wandering/ambient behavior) for a faction.
Events (Triggers)
On Crowd Agent Hit
Triggered when an Enemy Masses agent hits the Player Target.
Filter By Faction: Optional faction filter.
Only Melee/Ranged: Filter by attack type.
Parameters: Access
LastHitDamage,LastAttackerAgent, etc. via static properties or custom Instructions.
On Crowd Hit Receiver
Triggered when an agent hits a CrowdHitReceiver component.
Receiver: The specific receiver to listen to (or all).
Parameters: Access
LastHitReceiver,LastHitDamage, etc.
Conditions
Crowd Agent In Range
Returns true if at least one agent is within a radius of a position.
Any Crowd Agent Alive
Returns true if there is at least one alive agent in the scene.
Common Use Cases
Wave Spawner: Use a Trigger to detect when the player enters a room, then run a Spawn Crowd action.
Cinematic Battle: Use a Timeline or Sequence to spawn two opposing factions on opposite sides of a field.
Cleanup: Use Despawn Crowd when the player leaves a zone to free up performance.
Skill Damage: Use Crowd Melee Strike in your Player's Attack Skill to damage hundreds of enemies efficiently.
Last updated