galaxy-units-and-groups

Create and manage StarCraft 2 units and unit groups with Galaxy scripting.

7|1|Updated Mar 24, 2026
One-click install
npx skills add https://github.com/KimPlaybit/Starcraft-2-Editor-Skills --skill galaxy-units-and-groups
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: galaxy-units-and-groups
Source: https://github.com/KimPlaybit/Starcraft-2-Editor-Skills/tree/main/.agents/skills/galaxy-units-and-groups
Command: npx skills add https://github.com/KimPlaybit/Starcraft-2-Editor-Skills --skill galaxy-units-and-groups

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured guide for creating and managing StarCraft 2 units, their properties, behaviors, XP/leveling, and unit groups in Galaxy scripts, enabling consistent, repeatable map logic.

Core Features & Use Cases

  • Unit creation and property management (HP, shields, energy) and appearance tweaks
  • Applying and querying behaviors, abilities, and unit state changes
  • XP/leveling system integration and event listening for level-ups
  • Comprehensive unit group creation, filtering, iteration, and queries
  • Event handling for unit death, kill credit, and cargo/transport scenarios
  • Custom data slots (UnitSetCustomValue) for storing per-unit state
  • Examples and references to common library patterns and helper wrappers

Quick Start

Create a Marine unit at a given point, set its HP to 75, assign 200 XP, and add it to the player's unit group.

Frequently Asked Questions about galaxy-units-and-groups

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

FAQPage Schema
How do I create a unit and set its properties using Galaxy scripting in StarCraft 2?

To create a unit using Galaxy scripting, you instantiate it at a specified point and then use native functions to set properties like HP, shields, and energy, ensuring consistent map logic and appearance tweaks.

How does unit group filtering and iteration work in Galaxy scripts?

Unit group management in Galaxy scripts involves creating a group, applying filters to query specific units, and iterating through the results to issue orders or check unit states within various gameplay scenarios.

Can I implement an XP and leveling system for units in StarCraft 2 maps?

Yes, you can integrate an XP and leveling system by assigning experience points to units and setting up event listeners to handle level-ups, allowing dynamic unit progression in your custom maps.

What is the best way to handle unit death and kill credit events in Galaxy?

Handling unit death in Galaxy requires setting up event triggers that capture the dying unit, properly attribute kill credit, and manage related scenarios like cargo drops or transport unload events securely.

Do I need custom data slots to track per-unit state in StarCraft 2 scripting?

You need custom data slots when tracking per-unit state, using the UnitSetCustomValue pattern to store variables directly on the unit for consistent behavior and state management across gameplay events.