galaxy-triggers-and-functions

Automate Galaxy trigger declaration, event registration, and async execution.

3|2|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/ShadowDragonSC2/Base.SC2Data --skill galaxy-triggers-and-functions-shadowdragonsc2
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: galaxy-triggers-and-functions
Source: https://github.com/ShadowDragonSC2/Base.SC2Data/tree/main/.koda/skills/galaxy-triggers-and-functions
Command: npx skills add https://github.com/ShadowDragonSC2/Base.SC2Data --skill galaxy-triggers-and-functions-shadowdragonsc2

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Galaxy developers need a structured approach to declare and register triggers, manage async execution, and organize complex event flows without unit-specific or UI events. This Skill provides a consolidated reference for trigger patterns, Init routines, and the multithreading model used in Galaxy scripting.

Core Features & Use Cases

  • Trigger declaration and registration patterns (Init functions, TriggerCreate, TriggerAddEvent...).
  • Async execution patterns with TriggerExecute and static parameter usage.
  • Cinematic Sequencer / TriggerQueue concepts.
  • Examples of library-style patterns for map init and modular triggers.
  • Guidelines for multithreading, event handling, and common events.

Quick Start

Initialize a modular Galaxy trigger system by wiring module triggers, registering events, and wrapping async actions with proper parameter capture.

Frequently Asked Questions about galaxy-triggers-and-functions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I declare and register triggers in Galaxy scripting for SC2 map development?▼

Declare and register triggers in Galaxy scripting by using Init functions alongside TriggerCreate and TriggerAddEvent functions to wire modular events for SC2 map development. This approach establishes a structured trigger system.

What is the best way to manage async execution and Wait-based actions in Galaxy triggers?▼

Manage async execution in Galaxy triggers by using TriggerExecute alongside static parameter usage to safely capture variables during Wait-based actions and cinematic sequencing. This prevents multithreading conflicts in async flows.

How does the TriggerQueue work for cinematic sequencing in Galaxy map triggers?▼

The TriggerQueue coordinates cinematic sequencing by ordering modular trigger execution across modules in Galaxy scripting. It manages event flows and Wait-based actions to ensure proper async sequencing during map cinematics.

Can I use modular triggers to coordinate events across multiple modules in Galaxy scripting?▼

Yes, modular triggers coordinate events across modules in Galaxy scripting by wiring module triggers during map initialization. This library-style pattern organizes complex event flows without requiring unit-specific or UI events.

What are the multithreading semantics and limitations when using TriggerExecute in Galaxy?▼

Galaxy enforces safe multithreading semantics during TriggerExecute by requiring static parameter usage to prevent race conditions in async flows. Limitations include avoiding unsafe shared state access across concurrent trigger executions.