Spring.GetPlayerList() How to exclude spectators?

Spring.GetPlayerList() How to exclude spectators?

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Spring.GetPlayerList() How to exclude spectators?

Post by Forboding Angel »

This has been bugging me for some time... How do you exclude specs? For a little bit I thought that's what the active bool did, but then I realized that is for dead/alive/disconnected/etc.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Spring.GetPlayerList() How to exclude spectators?

Post by Silentwings »

Use Spring.GetPlayerInfo(playerID) to find out players details, including if a given playerID is currently a spectator.
Post Reply

Return to “Lua Scripts”