Does PlayerCount() count spectators?

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
Ænima
Addicted to Zandronum
Posts: 3579
Joined: Tue Jun 05, 2012 6:12 pm

Does PlayerCount() count spectators?

#1

Post by Ænima » Mon Aug 13, 2012 9:14 am

Does PlayerCount count all clients (including specs), or just ingame players?
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

Theshooter7
Forum Regular
Posts: 262
Joined: Wed Jun 06, 2012 2:15 am

RE: Does PlayerCount() count spectators?

#2

Post by Theshooter7 » Mon Aug 13, 2012 12:25 pm

Ænima wrote: Does PlayerCount count all clients (including specs), or just ingame players?
Just ingame players.
Image

User avatar
Ænima
Addicted to Zandronum
Posts: 3579
Joined: Tue Jun 05, 2012 6:12 pm

RE: Does PlayerCount() count spectators?

#3

Post by Ænima » Mon Aug 13, 2012 7:58 pm

Thanks. That's what I need.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

Catastrophe
Retired Staff / Community Team Member
Posts: 2569
Joined: Sat Jun 02, 2012 2:44 am

RE: Does PlayerCount() count spectators?

#4

Post by Catastrophe » Mon Aug 13, 2012 8:56 pm

you might wanna keep in mind that in LMS it will return 2 even if you've won.

User avatar
Torr Samaho
Lead Developer
Posts: 1543
Joined: Fri May 25, 2012 6:03 pm
Location: Germany

RE: Does PlayerCount() count spectators?

#5

Post by Torr Samaho » Mon Aug 13, 2012 9:06 pm

Catastrophe wrote: you might wanna keep in mind that in LMS it will return 2 even if you've won.
This is because a player is not turned into a dead spectator immediately after dying, but only when the player tries to respawn. So in the moment you win, there actually are still two non-spectators left (one of them dead though without chance to respawn).

ZzZombo
Forum Regular
Posts: 323
Joined: Mon Jun 11, 2012 12:11 pm
Location: Ravenholm

RE: Does PlayerCount() count spectators?

#6

Post by ZzZombo » Sun Aug 19, 2012 2:42 pm

I think it can be worked around by using "Instant respawn" flag.

Post Reply