How Do I Make My Game End When everybody's infected?

I am trying to make it so when everybody’s ‘infected’, the game ends. Does anyone know how to do this?

use the end game command and channels

I know but I don’t know how to make the game know when 0 players are on team 1.

Try this:

I already have that but then it ends right at the start of the game.

Use 1 player per team relay instead. Then on behalf of all players, make this code run constantly:

if get property "teams" < 2
do broadcast message on channel "end"
1 Like

So Lifecycle (Game start) → Relay (all players)
Relay → increment counter
And…


Target (for counter) = 1
I Hope this helps you :snowman_with_snow:

1 Like

Target of 1. The infector will still be left.

1 Like

Everybody will still be alive, just on team 2.

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.