Game waits until commander slot is filled.

d0ublethinkd0ublethink Join Date: 2010-07-14 Member: 72362Members
As the title states, I am looking for a way to stop the game from starting until both com chairs are filled.

How do I do this?

Thank you.

Comments

  • CoTTonCoTTon Join Date: 2005-02-28 Member: 42773Members
    that would be a great feature - however it will be a problem if the server is empty and starting to fill up
  • d0ublethinkd0ublethink Join Date: 2010-07-14 Member: 72362Members
    I disagree. Just because a server is low on players doesn't mean the people in it want a hopelessly one sided game.

    The game will often start without a comm on one side and that team is hopelessly behind no matter what. There are some comebacks from what I am seeing, but I'd rather have the timings work out fairly to start with.
  • TechnIckSTechnIckS Join Date: 2007-01-14 Member: 59616Members
    Agreed, but only when there are a total of <4 players connected. When 4 are connected feature would be awesome!
  • kk20kk20 Join Date: 2012-10-30 Member: 164592Members
  • d0ublethinkd0ublethink Join Date: 2010-07-14 Member: 72362Members
    edited November 2012
    OK I have written some LUA that would do what I want, but I obviously can't edit this file since it says "client and server differ" when i run it.

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->    function NS2Gamerules:UpdatePregame(timePassed)

            if self:GetGameState() == kGameState.PreGame then
            
                local preGameTime = self:GetPregameLength()
                
                local AlienComExists    =    Shared.GetEntitiesWithClassname("AlienCommander"):GetSize() ~= 0
                local MarineComExists    =    Shared.GetEntitiesWithClassname("MarineCommander"):GetSize() ~= 0
                local BothComExists        =    AlienComExists and MarineComExists

                if self.timeSinceGameStateChanged > preGameTime then
                
                    if BothComExists then
                
                        StartCountdown(self)
                        if Shared.GetCheatsEnabled() then
                            self.countdownTime = 1
                        end
                    end
                    
                end<!--c2--></div><!--ec2-->


    That was just a first try, but it obviously needs to be applied as a MOD to work. Can anyone help me out here?
Sign In or Register to comment.