Size: 6736
Comment:
|
Size: 6767
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
## page was renamed from BuildingBean | |
Line 76: | Line 77: |
Line 78: | Line 78: |
[[ObjectCity|City]] | ScriptObjects |
Contents
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)
In the following examples, x can be any number from 0-73:
buildings[x].name
Usage: |
city.buildings[x].name |
Example: |
city.buildings[0].name |
The name of the type of building ("Forge","Stable","Inn",etc.)
buildings[x].positionId
Usage: |
city.buildings[x].positionId |
Example: |
city.buildings[0].positionId |
The numbers below indicate the .positionId (city.building[x].positionId) (The Town Hall is in position -1)
buildings[x].status
Usage: |
city.buildings[x].status |
Example: |
city.buildings[0].status |
0 = building complete
1 = upgrading
2 = demolishing
buildings[x].endTime
Usage: |
city.buildings[x].endTime |
Example: |
city.buildings[1].endTime |
returns the time in UNIX timestamp format indicating when building will be finished upgrading or demolishing
(returns 0 if it is not being worked on)
buildings[x].startTime
Usage: |
city.buildings[x].startTime |
Example: |
city.buildings[1].startTime |
returns the time in UNIX timestamp format indicating when building began being upgraded or demolished
(returns 0 if it is not being worked on)
buildings[x].typeId
Usage: |
city.buildings[x].typeId |
Example: |
city.buildings[1].typeId |
The numerical code for the buildingType
buildings[x].level
Usage: |
city.buildings[x].level |
Example: |
city.buildings[1].level |
level of the building
buildings.length
Usage: |
city.buildings.length |
Example: |
city.buildings.length |
Total number of buildings in the current city