nolan
May 31, 2024, 1:39pm
1
How do I make it so a counter counts how many players there are and once all players are hit on one team the game is over
well… You could make the host set a number for the number of players on one team and set up a Lifecycle for players knocked out and wire it like this "lifecycle happens - decrement counter, make the target value of the counter 0 (the starting number on the counter being 1) and wire the counter to an end game device (counter target reached-end game).
This should end the game when all players are on one team.
The trigger all the way on the left should be triggered whenever you want to start keeping track if all teams have been knocked out. That trigger needs to be triggered by something of global scope, like an all player relay. The delay on it is 1 second. That trigger should broadcast on “Check Game End”.
Make the counter on that trigger’s right increase on “Check Game End”. This counter team scoped. Make that counter’s target be 1 and broadcast on “teamAlive”.
The next counter should increase on “teamAlive” and is global scope. The target should be 2 and it should broadcast on “noGameEnd” when the target is reached.
Trigger 2 should receive on “Check Game End” and have a delay of .5 seconds. Trigger 2 needs to trigger Trigger 3. Trigger 3 should deactivate on “noGameEnd” and broadcast to the end game device.
Trigger 4 should receive on “Check Game End” and have a delay of .7 seconds and broadcast on “resetLogicEnd”. Make both counters reset on “resetLogicEnd”. Make Trigger 3 activate on “resetLogicEnd”.
Hope this works for you!