# Copy Unit Control Groups

Grammar — Copy the control group states of sourceUnit to targetUnit
FlagsAction

Copy all control group states on a unit to another unit.

# Arguments

  • unit — Source Unit
  • unit — Target Unit

Returns — void

void libNtve_gf_CopyUnitControlGroups(
	unit lp_sourceUnit,
	unit lp_targetUnit,
);

Category: Selection / Control Groups

# Examples

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:26485

        if (auto8B4AE5B8_var == null) { break; }
        libNtve_gf_ReplaceUnit(auto8B4AE5B8_var, "TychusResearchCenterUnlocked", libNtve_ge_ReplaceUnitOptions_OldUnitsRelative);
        libNtve_gf_CopyUnitControlGroups(auto8B4AE5B8_var, libNtve_gf_LastReplacedUnit());
        UnitCreateEffectUnit(auto8B4AE5B8_var, "TychusResearchCenterCopyRally", libNtve_gf_LastReplacedUnit());
        libCOUI_gv_cU_TychusSquadBar = libNtve_gf_LastReplacedUnit();