# Units In Unit Group With Custom Value
Grammar — Units in group|Unit Group with custom value index equal to value
Flags —Function
# Arguments
unitgroup
— Groupint
— Indexfixed
— Value
Returns — unitgroup
unitgroup libNtve_gf_UnitsInUnitGroupWithCustomValue(
unitgroup lp_group,
int lp_index,
fixed lp_value,
);
# Related
Category: Unit Group / Useful Unit Groups
- Empty Unit Group —
unitgroup
— UnitGroupEmpty - Idle Units For Player —
unitgroup
— UnitGroupIdle - Convert Unit To Unit Group —
unitgroup
— libNtve_gf_ConvertUnitToUnitGroup - Units In Region Matching Condition —
unitgroup
— UnitGroup - Unit Count In Region Matching Condition —
int
— UnitCount - Units Near Point Matching Condition —
unitgroup
— UnitGroupSearch - Units In Region With Alliance To Player —
unitgroup
— UnitGroupAlliance - Unit Count In Region With Alliance To Player —
int
— UnitCountAlliance - Units In Region With Alliance To Player Matching Condition —
unitgroup
— libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition - Units In Unit Group For Player —
unitgroup
— UnitGroupFilterPlayer - Units In Unit Group Matching Condition —
unitgroup
— UnitGroupFilter - Units In Unit Group Targetable As —
unitgroup
— UnitGroupFilterPlane - Units In Unit Group With Alliance —
unitgroup
— UnitGroupFilterAlliance - Units In Unit Group With Custom Value —
unitgroup
— libNtve_gf_UnitsInUnitGroupWithCustomValue - Units In Unit Group Within Region —
unitgroup
— UnitGroupFilterRegion
# Examples
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map/MapScript.galaxy:636
// Implementation
lv_targetPool = libNtve_gf_UnitsInUnitGroupWithCustomValue(gv_virophages, 1, 0.0);
lv_tARGET = UnitGroupRandomUnit(lv_targetPool, c_unitCountAlive);
if ((lv_tARGET != null)) {
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map — MapScript.galaxy:636
// Implementation
lv_targetPool = libNtve_gf_UnitsInUnitGroupWithCustomValue(gv_virophages, 1, 0.0);
lv_tARGET = UnitGroupRandomUnit(lv_targetPool, c_unitCountAlive);
if ((lv_tARGET != null)) {