Announcement

Collapse
No announcement yet.

Simple request? Score stats OFF initially

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Simple request? Score stats OFF initially

    been messing with python and I can't get the initial score list when you start a game to be OFF! I don't like to have that informaiton as I play and would like to have that toggled OFF initially.

    ANyone know how to do this? I've messed with a lot of the various python scripts but short of turning off the score calc to always score people at 0 I can't get it to go away.

    DON'T REPLY with guesses! If you don't KNOW don't reply- I've tried more things than anyone taking a guess would think, so no false goose chases please.

    Thanks

  • #2
    These commands will toggle off the score during an event firing.

    if (CyInterface().isScoresVisible()):
    CyInterface().toggleScoresVisible()

    You should be able to nail that up in the onGameStart event.

    I don't know what you are doing for your event files, but a sample onGameStart procedure might look like so:

    def onGameStart(self, argsList):
    'Called at the start of the game'
    if (gc.getGame().getGameTurnYear() == gc.getDefineINT("START_YEAR")):
    for iPlayer in range(gc.getMAX_PLAYERS()):
    player = gc.getPlayer(iPlayer)
    if (player.isAlive() and player.isHuman()):
    popupInfo = CyPopupInfo()
    popupInfo.setButtonPopupType(ButtonPopupTypes.BUTT ONPOPUP_PYTHON_SCREEN)
    popupInfo.setText(u"showDawnOfMan")
    popupInfo.addPopup(iPlayer)
    ###########################################
    ##Commands to hide the scores at the start below.
    if (CyInterface().isScoresVisible()):
    CyInterface().toggleScoresVisible()
    ###########################################

    I'm losing my tabs on this website, don't forget to reindent the code.

    Comment


    • #3
      Thanks! Hadn't thought of this approach! Looking too hard for the simple: display = false sort of thing.

      Comment

      Working...
      X