Not logged inOpenClonk Forum
Up Topic Development / Developer's Corner / Re: GetPlayersInTeam
- - By Zapper [de] Date 2015-06-02 06:16
https://git.openclonk.org/openclonk.git/commit/a0f95c0e93e396e5dfc306052b5ffb787518b839

Cool stuff. What about replacing it with a generic GetPlayers(int player_type, int team) though? It's 2015 and we still have to go through the hassle of GetPlayerCount & GetPlayerByIndex ten times in every scenario.

for (var player in GetPlayers())! (or for (var player in GetPlayers(nil, team) then for you)
Parent - - By Maikel Date 2015-06-02 09:50
I can add that function as well, or do you prefer it to be an engine function?
Parent - By Zapper [de] Date 2015-06-02 11:00
Script is completely fine with me!

In fact, we should start documenting such "main" System.ocg functions in the docs (possibly auto-generated)
Parent - By Maikel Date 2015-06-17 22:14
GetPlayers is now in the Controls branch in favour of GetPlayersInTeam.
- - By Maikel Date 2015-06-17 21:42
We also might need (I do) a function to go from player id to player number, opposite of GetPlayerID.

Anyone an idea for an implementation?
Parent - By Maikel Date 2015-06-17 22:13
Done with a loop for now.
Up Topic Development / Developer's Corner / Re: GetPlayersInTeam

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill