# Player From Player Group

Grammar — Player i from g|Player Group
FlagsNative | Function

Returns the player stored at the specified Index of the specified player group. For example: If you have players 4, 5, and 6 in a player group Index 1 would be Player 4, and this function would return 4.

# Arguments

  • playergroup — Group
  • int — Index

Returns — int

native int PlayerGroupPlayer(
	playergroup inGroup,
	int inIndex,
);

Category: Player Group / Groups

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L8621
PlayerGroupPlayer(auto3C20983D_g, auto3C20983D_p)
// L8622
PlayerGroupPlayer(auto3C20983D_g, auto3C20983D_p)
// L9461
PlayerGroupPlayer(autoB9BF28AF_g, autoB9BF28AF_p)
// L9462
PlayerGroupPlayer(autoB9BF28AF_g, autoB9BF28AF_p)
// L9501
PlayerGroupPlayer(autoFB9AF868_g, autoFB9AF868_p)
// L9502
PlayerGroupPlayer(autoFB9AF868_g, autoFB9AF868_p)
// L18210
PlayerGroupPlayer(autoB89CC9F3_g, autoB89CC9F3_p)
// L18211
PlayerGroupPlayer(autoB89CC9F3_g, autoB89CC9F3_p)
// L8621
PlayerGroupPlayer(auto3C20983D_g, auto3C20983D_p)
// L8622
PlayerGroupPlayer(auto3C20983D_g, auto3C20983D_p)
// L9461
PlayerGroupPlayer(autoB9BF28AF_g, autoB9BF28AF_p)
// L9462
PlayerGroupPlayer(autoB9BF28AF_g, autoB9BF28AF_p)
// L9501
PlayerGroupPlayer(autoFB9AF868_g, autoFB9AF868_p)
// L9502
PlayerGroupPlayer(autoFB9AF868_g, autoFB9AF868_p)
// L18210
PlayerGroupPlayer(autoB89CC9F3_g, autoB89CC9F3_p)
// L18211
PlayerGroupPlayer(autoB89CC9F3_g, autoB89CC9F3_p)

# mods/heroesbrawlmods/arenamodemods/arenamode.stormmod

LibAREN.galaxy

// L326
PlayerGroupPlayer(lv_indexPool, RandomInt(1, PlayerGroupCount(lv_indexPool)))
// L1257
PlayerGroupPlayer(lv_weirdoPoints, RandomInt(1, PlayerGroupCount(lv_weirdoPoints)))
// L2259
PlayerGroupPlayer(lv_weirdoPoints, RandomInt(1, PlayerGroupCount(lv_weirdoPoints)))

# mods/heroesbrawlmods/arenamodemods/trialgrounds.stormmod

LibAMVS.galaxy

// L218
PlayerGroupPlayer(libAMVS_gv_eventShufflerPG, RandomInt(1, PlayerGroupCount(libAMVS_gv_eventShufflerPG)))
// L222
PlayerGroupPlayer(libAMVS_gv_eventShufflerPG, RandomInt(1, PlayerGroupCount(libAMVS_gv_eventShufflerPG)))

# mods/heroesbrawlmods/brawlmapmods/coop/escapefrombraxis.stormmod

LibPEB1.galaxy

// L7091
PlayerGroupPlayer(lv_zergBossGroup, RandomInt(1, PlayerGroupCount(lv_zergBossGroup)))

# mods/heroesbrawlmods/brawlmapmods/coop/pvebrawlmod.stormmod

LibPVEB.galaxy

// L607
PlayerGroupPlayer(libGame_gf_PlayersOnTeamHeroes(libGame_gv_teamChaosIndex_C, false), lv_index)

# mods/heroesbrawlmods/brawlmapmods/coop/pvemod.stormmod

LibPVEM.galaxy

// L814
PlayerGroupPlayer(libPVEM_gf_PvEPlayersOnComputerTeam(false), lv_index)

# mods/heroesbrawlmods/brawlmapmods/lunarfestival.stormmod

LibLNYF.galaxy

// L1592
PlayerGroupPlayer(libLNYF_gv_leaderboard.lv_players_RaceFinished, lv_leaderboardRank)

# mods/heroesdata.stormmod

GameLib.galaxy

// L6316
PlayerGroupPlayer(lp_killingGroup, 1)
// L6468
PlayerGroupPlayer(libGame_gf_AlliedPlayerGroupOfPlayer(lv_deadPlayer), 1)
// L6468
PlayerGroupPlayer(libGame_gf_AlliedPlayerGroupOfPlayer(lv_deadPlayer), 1)
// L6640
PlayerGroupPlayer(lp_deadPlayersTeam, RandomInt(1, lv_numberOfPlayersOnDeadPlayersTeam))
// L9141
PlayerGroupPlayer(lv_killCreditGroup, 1)
// L9438
PlayerGroupPlayer(PlayerGroupAlliance(c_playerGroupAlly, lp_killingPlayer), 1)

# mods/heroesdata.stormmod

HeroesLib.galaxy

// L2281
PlayerGroupPlayer(PlayerGroupAlliance(c_playerGroupAlly, UnitGetOwner(lp_deadUnit)), 1)

# mods/heroesdata.stormmod

MapMechanicsLib.galaxy

// L2182
PlayerGroupPlayer(lp_creditPlayerGroup, RandomInt(1, PlayerGroupCount(lp_creditPlayerGroup)))

# mods/heroesdata.stormmod

SoundLib.galaxy

// L1054
PlayerGroupPlayer(libSond_gv_heroVO_HeroTakedownVOAlliesGroup[lv_triggeringPlayer], RandomInt(1, lv_numberOfPlayersInAlliesGroup))
// L1208
PlayerGroupPlayer(lv_teamPlayerGroup, RandomInt(1, lv_numberOfPlayersInTeamPlayerGroup))
// L1264
PlayerGroupPlayer(libSond_gv_heroVO_CelebrateVOAlliesGroup[lv_triggeringTimerPlayer], RandomInt(1, lv_numberOfPlayersInTeamPlayerGroup))

# mods/heroesdata.stormmod

StartingExperienceLib.galaxy

// L1010
PlayerGroupPlayer(lv_playersModelGood, RandomInt(1, PlayerGroupCount(lv_playersModelGood)))

# mods/heroesdata.stormmod

SupportLib.galaxy

// L187
PlayerGroupPlayer(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup, 1)
// L223
PlayerGroupPlayer(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup, 2)
// L224
PlayerGroupPlayer(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup, 2)
// L225
PlayerGroupPlayer(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup, 3)
// L226
PlayerGroupPlayer(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup, 3)
// L262
PlayerGroupPlayer(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup, 4)
// L263
PlayerGroupPlayer(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup, 4)
// L264
PlayerGroupPlayer(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroup, 5)
// L265
PlayerGroupPlayer(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroup, 5)
// L566
PlayerGroupPlayer(libGame_gv_teams[lv_itTeam].lv_teamPlayerGroupNoNPCPlayers, 1)

# mods/heroesdata.stormmod

UILib.galaxy

// L14454
PlayerGroupPlayer(PlayerGroupAlliance(c_playerGroupEnemy, lv_i_Player), RandomInt(1, PlayerGroupCount(PlayerGroupAlliance(c_playerGroupEnemy, lv_i_Player))))

# mods/heroesmapmods/battlegroundmapmods/heavenhell.stormmod

LibMLHH.galaxy

// L305
PlayerGroupPlayer(lv_lootRingPlayerGroup, RandomInt(1, PlayerGroupCount(lv_lootRingPlayerGroup)))
// L324
PlayerGroupPlayer(lv_lootRingPlayerGroup, RandomInt(1, PlayerGroupCount(lv_lootRingPlayerGroup)))
// L354
PlayerGroupPlayer(lv_lootRingPlayerGroup, RandomInt(1, PlayerGroupCount(lv_lootRingPlayerGroup)))

# mods/heroesmapmods/battlegroundmapmods/infernalshrines.stormmod

LibMSHE.galaxy

// L215
PlayerGroupPlayer(libMSHE_gv_mMISShrineGroup, RandomInt(1, PlayerGroupCount(libMSHE_gv_mMISShrineGroup)))

# mods/heroesmapmods/battlegroundmapmods/towersofdoom.stormmod

LibMTOD.galaxy

// L303
PlayerGroupPlayer(libMTOD_gv_mMToDScoringAltarRemainingConfigsThreeAltarEvent, RandomInt(1, PlayerGroupCount(libMTOD_gv_mMToDScoringAltarRemainingConfigsThreeAltarEvent)))
// L307
PlayerGroupPlayer(libMTOD_gv_mMToDScoringAltarRemainingConfigs, RandomInt(1, PlayerGroupCount(libMTOD_gv_mMToDScoringAltarRemainingConfigs)))
// L311
PlayerGroupPlayer(libMTOD_gv_mMToDScoringAltarRemainingConfigs, RandomInt(1, PlayerGroupCount(libMTOD_gv_mMToDScoringAltarRemainingConfigs)))
// L315
PlayerGroupPlayer(libMTOD_gv_mMToDScoringAltarRemainingConfigs, RandomInt(1, PlayerGroupCount(libMTOD_gv_mMToDScoringAltarRemainingConfigs)))
// L319
PlayerGroupPlayer(libMTOD_gv_mMToDScoringAltarRemainingConfigsThreeAltarEvent, RandomInt(1, PlayerGroupCount(libMTOD_gv_mMToDScoringAltarRemainingConfigsThreeAltarEvent)))
// L323
PlayerGroupPlayer(libMTOD_gv_mMToDScoringAltarRemainingConfigs, RandomInt(1, PlayerGroupCount(libMTOD_gv_mMToDScoringAltarRemainingConfigs)))
// L332
PlayerGroupPlayer(libMTOD_gv_mMToDScoringAltarRemainingConfigs, RandomInt(1, PlayerGroupCount(libMTOD_gv_mMToDScoringAltarRemainingConfigs)))
// L336
PlayerGroupPlayer(libMTOD_gv_mMToDScoringAltarRemainingConfigs, RandomInt(1, PlayerGroupCount(libMTOD_gv_mMToDScoringAltarRemainingConfigs)))
// L340
PlayerGroupPlayer(libMTOD_gv_mMToDScoringAltarRemainingConfigs, RandomInt(1, PlayerGroupCount(libMTOD_gv_mMToDScoringAltarRemainingConfigs)))
// L344
PlayerGroupPlayer(libMTOD_gv_mMToDScoringAltarRemainingConfigs, RandomInt(1, PlayerGroupCount(libMTOD_gv_mMToDScoringAltarRemainingConfigs)))

# mods/heroesmapmods/battlegroundmapmods/warheadjunction.stormmod

LibMSC2.galaxy

// L164
PlayerGroupPlayer(lv_terrazineLaneGroup, RandomInt(1, PlayerGroupCount(lv_terrazineLaneGroup)))

# mods/missionpacks/novacampaign.sc2mod

LibNCMI.galaxy

// L1771
PlayerGroupPlayer(autoEDCAAF8F_g, autoEDCAAF8F_p)
// L1772
PlayerGroupPlayer(autoEDCAAF8F_g, autoEDCAAF8F_p)
// L2777
PlayerGroupPlayer(autoDF48CB2F_g, autoDF48CB2F_p)
// L2778
PlayerGroupPlayer(autoDF48CB2F_g, autoDF48CB2F_p)
// L2856
PlayerGroupPlayer(autoE1FC9780_g, autoE1FC9780_p)
// L2857
PlayerGroupPlayer(autoE1FC9780_g, autoE1FC9780_p)
// L2860
PlayerGroupPlayer(auto201B96D5_g, auto201B96D5_p)
// L2861
PlayerGroupPlayer(auto201B96D5_g, auto201B96D5_p)

# mods/missionpacks/novacampaign.sc2mod

LibNovC.galaxy

// L2242
PlayerGroupPlayer(auto015E2278_g, auto015E2278_p)
// L2243
PlayerGroupPlayer(auto015E2278_g, auto015E2278_p)
// L2258
PlayerGroupPlayer(auto8236ADDB_g, auto8236ADDB_p)
// L2259
PlayerGroupPlayer(auto8236ADDB_g, auto8236ADDB_p)

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L976
PlayerGroupPlayer(libCOOC_gf_HumanPlayers(), 1)
// L1993
PlayerGroupPlayer(lv_attackingPlayers, lv_playerIter)
// L2075
PlayerGroupPlayer(lv_attackingPlayers, lv_playerIter)
// L2158
PlayerGroupPlayer(lv_attackingPlayers, lv_playerIter)
// L6692
PlayerGroupPlayer(libCOOC_gf_CommanderPlayers(), 1)
// L6692
PlayerGroupPlayer(libCOOC_gf_CommanderPlayers(), 2)
// L6952
PlayerGroupPlayer(libCOOC_gf_CommanderPlayers(), 1)
// L6952
PlayerGroupPlayer(libCOOC_gf_CommanderPlayers(), 2)
// L12277
PlayerGroupPlayer(autoD1FA3909_playerPool, 1)
// L29978
PlayerGroupPlayer(auto62F6BACF_playerPool, 1)

# mods/starcoop/starcoop.sc2mod

LibCOOC.galaxy

// L1376
PlayerGroupPlayer(lv_group, 1)
// L1397
PlayerGroupPlayer(lv_group, 1)

# mods/warcoop/warclassicsystem.sc2mod

WarClassicSystem.galaxy

// L646
PlayerGroupPlayer(PlayerGroupActive(), 1)

# mods/warcoop/warcoopdata.sc2mod

WarCoopData.galaxy

// L483
PlayerGroupPlayer(lp_playerGroup, RandomInt(1, lv_numberofplayers))
// L1617
PlayerGroupPlayer(lv_players, lv_player)

# mods/warcoop/warmeleeai.sc2mod

MeleeWaveAI.galaxy

// L71
PlayerGroupPlayer(enemies,i)

# mods/warcoop/warmeleeai.sc2mod

Orc.galaxy

// L470
PlayerGroupPlayer(enemies,i)