View Single Post
  #4  
Old 05-27-2011, 01:03 AM
TheEnlightenedFlorist TheEnlightenedFlorist is offline
Approved Member
 
Join Date: May 2011
Location: SLC, Utah, USA
Posts: 143
Default

Quote:
Originally Posted by SYN_Flashman View Post
I have one for you now: Will this allow us to rotate to a new mission after a set time without disconnecting all the players? (you know, like we used to do in IL2)
I don't think so. I was hoping we'd be able to call gpBattleStop(), then immediately load a new mission, but gpBattleStop() doesn't seem to stop the battle. It might be a bug, or it might be intended for something else.

Quote:
Originally Posted by SYN_Flashman View Post
One issue we at Syndicate is finding is that whilst having all sorts of scripts is great, every time an AI mission spawns the pings creep up (though we might be doing something wrong). If we can start a new mission every 4 hours or so we could eliminate quite a few of the AI.
If you think AI are starting to pile up in your server, try putting the following code into your OnTickGame() method. Every five minutes, it should print to the chat bar the number of AirGroups in the server. It's not an exact count of the number of AI aircraft on the server, but if the number continually climbs, you know that not all AI are being taken care of. Also, it will only work if there is more than one aircraft on both sides, so you might not see it immediately after starting the server.

Code:
        if (GamePlay.gpAirGroups(1) != null && GamePlay.gpAirGroups(2) != null)
        {
            if (Time.tickCounter() % 9000 == 0)
            {
                int totalAircraft = GamePlay.gpAirGroups(1).Length + GamePlay.gpAirGroups(2).Length;
                GamePlay.gpLogServer(new Player[] { GamePlay.gpPlayer() }, totalAircraft.ToString(), null);
                GamePlay.gpLogServer(GamePlay.gpRemotePlayers(), totalAircraft.ToString(), null);
            }
        }
Reply With Quote