Pazyryk
Deity
- Joined
- Jun 13, 2008
- Messages
- 3,584
Running Live Tuner with a Tiny Continents map:
for area in Map.Areas() do print(area) end
--this prints integers 1 through 29 (not area objects as I expected)
for iPlot = 0, Map.GetNumPlots() - 1 do print(Map.GetPlotByIndex(iPlot):GetArea()) end
--this prints integers too, but they are like 573441, 688143, 745494, etc. They print out in a clustered way that makes me think they do correspond to different areas.
So my conclusion is: don't use Map.Areas() as an iterator to get areas or iAreas.
A few questions though:
for area in Map.Areas() do print(area) end
--this prints integers 1 through 29 (not area objects as I expected)
for iPlot = 0, Map.GetNumPlots() - 1 do print(Map.GetPlotByIndex(iPlot):GetArea()) end
--this prints integers too, but they are like 573441, 688143, 745494, etc. They print out in a clustered way that makes me think they do correspond to different areas.
So my conclusion is: don't use Map.Areas() as an iterator to get areas or iAreas.
A few questions though:
- Can I get a list of actual iAreas without iterating over all plots? (Not a big problem)
- Do areas change during a game?
- It seems that all plots belong to an area (GetArea() returns some integer). Do islands get put in their own area, in an "ocean area", or are they put with a nearby continental area?