# Wave Target Player

Grammar — Create a new wave target set to attack the folllowing player(s) player|Players
FlagsNative | Function

Creates a new wave target set to attack a player group. Returns the wave target.

# Arguments

  • playergroup — Player

Returns — wavetarget

native wavetarget AIWaveTargetPlayer(playergroup players);

Category: AI Advanced / Waves / Functions

# Examples

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

    }
    for (init_i = 0; init_i <= libCOMI_gv_cMC_CoopAI_HighestPlayerIndex; init_i += 1) {
        libCOMI_gv_cM_CoopAIPlayer_TargetOfAttackWaves[init_i] = AIWaveTargetPlayer(libCOOC_gf_HumanPlayers());
    }
    libCOMI_gv_cM_CoopAI_MissionType = "SiegeMission";

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

    AICampaignStart(lp_player);
    VisRevealArea(lp_player, RegionEntireMap(), 0.1, false);
    libCOMI_gf_SetCoopAIWaveTarget(lp_player, AIWaveTargetPlayer(PlayerGroupSingle(libCOMI_gf_CM_CoopAI_Get_EnemyPlayer(lp_player))));
    PlayerGroupAdd(libCOMI_gv_cM_CoopAI_Players, lp_player);
    libCOMI_gv_cM_CoopAIPlayer_InstantAttackGroupSpawn[lp_player] = PlayerStartLocation(lp_player);

mods/warcoop/warmeleeai.sc2modbase.sc2data/TriggerLibs/MeleeWaveAI.galaxy:133

	if(CR>=15 && PlayerGroupCount(pgMelee)>0){
		DebugAI("Attacking Player");
		return AIWaveTargetPlayer(pgMelee);
	}
	creep=GetCreepCamp(player,0,FloorI(CR*0.8),GAw3_PlayerAllowAirCreep(player));