• My Pages
  • Comments
  • Add Link
  • Subscribe
  • Subscribe User
  • Edit (Text)
  • Rename Page
  • Copy Page
  • Load Page
  • Save Page
  • Delete Page
  • Attachments
  • Check Spelling
  • Diffs
  • Info
  • Revert to this revision
  • XML
  • Render as Docbook
  • Print View
  • Raw Text
  • Delete Cache
  • Like Pages
  • Local Site Map
  • Remove Spam
  • Package Pages
  • Sync Pages
    • Diff for "Building"
    Differences between revisions 2 and 18 (spanning 16 versions)
    Revision 2 as of 2012-10-23 13:39:25
    Size: 707
    Editor: Inanna
    Comment:
    Revision 18 as of 2014-02-10 20:56:32
    Size: 1769
    Editor: Inanna
    Comment:
    Deletions are marked like this. Additions are marked like this.
    Line 1: Line 1:
     Building objects can reference details about the buildings currently built or still in progress in your cities.
    Line 3: Line 3:
    m_city.cityManager.buildings[0].endTime '''These objects can be referenced as:'''
    Line 5: Line 5:
    m_city.cityManager.buildings[0].level  . ''m_city.cityManager.buildings[x].property '''or''' city.buildings[x].property''
    Line 7: Line 7:
    m_city.cityManager.buildings[0].name The ''[x]'' can be any number from 0-73. Each city has up to 74 possible buildings on it, 32 spaces inside plus walls and town hall, and 40 spaces outside. The first building you start with is city.building[73] (The Town Hall) and each building you construct after that takes the next available number counting back to 0... (72,71,70,69,etc)
    Line 9: Line 9:
    m_city.cityManager.buildings[0].positionId ||<tablewidth="796px" tableheight="123px"#cccccc>'''Property ''' ||<#cccccc>'''Type''' ||<#cccccc>'''Description ''' ||
    ||name ||String ||The name of the type of building ("Forge","Stable","Inn",etc.) ||
    ||positionId ||int ||The number indicating the position id of the building. Town Hall is in position -1. See images below for each position id. ||
    ||status ||int ||The active status of the building. 0 = complete, 1 = upgrading, 2 = demolishing. ||
    ||endTime ||int ||Returns the time in UNIX timestamp format indicating when building will be finished upgrading or demolishing. Returns 0 if not being worked on. ||
    ||startTime ||int ||Returns the time in UNIX timestamp format indicating when building began upgrading or demolishing. Returns 0 if not being worked on. ||
    ||typeId ||int ||Returns the numerical code for the [[BuildingTypes]] ||
    ||level ||int ||Returns the level of the building. ||
    ||length ||int ||Returns the total number of buildings in the city. ||
    ----
    ScriptObjects
    Line 11: Line 21:
    m_city.cityManager.buildings[0].startTime
    Line 13: Line 22:
    m_city.cityManager.buildings[0].status ''' Position IDs for Building '''
    Line 15: Line 24:
    m_city.cityManager.buildings[0].typeId {{http://imageshack.us/a/img820/7558/positionid1.png}} {{http://imageshack.us/a/img10/8545/positionid2.png}}
    Line 17: Line 26:
    m_city.cityManager.buildings[1]

    m_city.cityManager.buildings[1].endTime

    m_city.cityManager.buildings[1].level

    m_city.cityManager.buildings[1].name

    m_city.cityManager.buildings[1].positionId

    m_city.cityManager.buildings[1].startTime

    m_city.cityManager.buildings[1].status

    m_city.cityManager.buildings[1].typeId

    m_city.cityManager.buildings[73].level
    Line 36: Line 28:
    CategoryVariables ScriptObjects

    Building objects can reference details about the buildings currently built or still in progress in your cities.

    These objects can be referenced as:

    • m_city.cityManager.buildings[x].property or city.buildings[x].property

    The [x] can be any number from 0-73. Each city has up to 74 possible buildings on it, 32 spaces inside plus walls and town hall, and 40 spaces outside. The first building you start with is city.building[73] (The Town Hall) and each building you construct after that takes the next available number counting back to 0... (72,71,70,69,etc)

    Property

    Type

    Description

    name

    String

    The name of the type of building ("Forge","Stable","Inn",etc.)

    positionId

    int

    The number indicating the position id of the building. Town Hall is in position -1. See images below for each position id.

    status

    int

    The active status of the building. 0 = complete, 1 = upgrading, 2 = demolishing.

    endTime

    int

    Returns the time in UNIX timestamp format indicating when building will be finished upgrading or demolishing. Returns 0 if not being worked on.

    startTime

    int

    Returns the time in UNIX timestamp format indicating when building began upgrading or demolishing. Returns 0 if not being worked on.

    typeId

    int

    Returns the numerical code for the BuildingTypes

    level

    int

    Returns the level of the building.

    length

    int

    Returns the total number of buildings in the city.


    ScriptObjects

    Position IDs for Building

    http://imageshack.us/a/img820/7558/positionid1.png http://imageshack.us/a/img10/8545/positionid2.png


    ScriptObjects

    Building (last edited 2019-12-18 17:18:13 by Inanna)