1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

How list units in a given plot

Discussion in 'Civ4 - Creation & Customization' started by Paolo80, Jul 15, 2020.

  1. Paolo80

    Paolo80 Chieftain

    Joined:
    Dec 20, 2019
    Messages:
    41
    Gender:
    Male
    Hi guys,

    I'm looking for a python function that lists all units in a given plot. Does it exist? I've found the function getUnitList in PyHelpers.py which lists all player's units. Is there a similar function to do this for a given plot?
     
  2. LPlate2

    LPlate2 Warlord

    Joined:
    Dec 27, 2018
    Messages:
    112
    Something like,
    Code:
    for i in range(pPlot.getNumUnits()):
        pLoopUnit = pPlot.getUnit(i)
     
  3. Paolo80

    Paolo80 Chieftain

    Joined:
    Dec 20, 2019
    Messages:
    41
    Gender:
    Male
    You're right. Thank you!
     

Share This Page