How do you guys do countdown (Game start) timers?

I asked a question a few days ago regarding timers per object (and got a great response concerning coroutines and I’m in great shape there, thanks). I was using those timers per object to do things like drop “mines” that only “arm” after 3 seconds, etc. I asked the following question minutes later and it was mistakenly flagged as a double post but it is an entirely different question.

Now I need to figure out how to make both players (this is multiplayer) wait until a 3 second (on screen) countdown is displayed before the game starts. I saw one tutorial that dealt with only a single player controller that did a countdown and then enable the player controller script , but that wouldn’t work with multiplayer as far as I know. Firstly, because it would need to wait indefinitely until someone else joins the room, and then wouldn’t I be wasting CPU checking every frame if there are still at least two players in the room? Secondly, as far as I know (I’m still VERY much a beginner) there are not ways to find by searching two scripts that have the same name on different players and still be able to enable them all.

I don’t think time.timescale will work because there are things that need to be going (lighting effects on the level, etc.) while the players wait.

How do you guys normally go about this?

Well, no. It’s not “wasting CPU”, it’s “doing work required for the game to function”.

–Eric

Fair enough, however I also would not know how to turn “off” the timer, except for deactivating the gameobject that the script is on. Something to the effect of (paraphrased not code)

On player enter room, instantiate scene object “timer” with timescript.cs on it.
In timescript.cs, check if player is alone (each frame or maybe use a coroutine to make the check happen every .5 seconds)
When player count >1, timescript puts an on-screen countdown (in a coroutine), after the coroutine ends, a function to activate all the player controller scripts in the scene, and then gameobject.destroy itself.

Sound like it would work?