# Units In Unit Group With Custom Value

Grammar — Units in group|Unit Group with custom value index equal to value
FlagsFunction

# Arguments

  • unitgroup — Group
  • int — Index
  • fixed — Value

Returns — unitgroup

unitgroup libNtve_gf_UnitsInUnitGroupWithCustomValue(
	unitgroup lp_group,
	int lp_index,
	fixed lp_value,
);

Category: Unit Group / Useful Unit Groups

# Examples

campaigns/swarm.sc2campaignbase.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.sc2mapMapScript.galaxy:636


    // Implementation
    lv_targetPool = libNtve_gf_UnitsInUnitGroupWithCustomValue(gv_virophages, 1, 0.0);
    lv_tARGET = UnitGroupRandomUnit(lv_targetPool, c_unitCountAlive);
    if ((lv_tARGET != null)) {