Altering Win/Loss Conditions Question

ApathymanApathyman Join Date: 2011-01-21 Member: 78495Members
I'm very new to Lua (which is very intuitive, but still getting used to it). I was wondering how to alter win conditions. I was looking through the code, and nothing I found in NS2Gamerules or Gamerules have any conditions for ending the game, just a flag that ends the game if it is set. Does anyone know where those conditions are located?

Comments

  • CamronCamron Join Date: 2011-01-06 Member: 76356Members
    edited January 2011
    Are you using Decoda? You can see a file's and class's function list on the left. It seems like you should check out "NS2Gamerules:CheckGameEnd()" and follow the code from there. That functions makes calls to "GetHasTeamLost()" so press ctrl + shift + F and search for "GetHasTeamLost()". Do the same for "GetHasTeamWon()". Just keep tracing the code like that.

    <a href="http://damien.kodingen.com/ns2docs/index.html" target="_blank">This</a> may help too.
  • ApathymanApathyman Join Date: 2011-01-21 Member: 78495Members
    Found it! Thank you so much for the references and resource.

    I was using notepad++ and emacs. Started using Decoda and found it almost immediately. I also bookmarked the link you provided, being able to get names in an easy list will be great to use in the future along with Decoda's search function. Turns out that I don't need to mod the Lua code at all, just make a few triggers to get the desired effect.
Sign In or Register to comment.