Protok St
Warlord
How to create Improvement by lua of the map?
There is a LUA's scripts for creating a separate maps. In those we can do like this:
plot:SetPlotType(PlotTypes.PLOT_LAND);
and this:
plot:SetTerrainType(TerrainTypes.TERRAIN_PLAINS);
and this:
plot:SetFeatureType(FeatureTypes.FEATURE_FOREST);
It's worked exactly expected.
But if I try same for imrovements it's not worked:
plot:SetImprovementType(ImprovementTypes.IMPROVEMENT_GOODY_HUT);
[166622.967] Runtime Error: ***.lua:279: attempt to index a nil value
stack traceback:
Where is a mistake?
There is a LUA's scripts for creating a separate maps. In those we can do like this:
plot:SetPlotType(PlotTypes.PLOT_LAND);
and this:
plot:SetTerrainType(TerrainTypes.TERRAIN_PLAINS);
and this:
plot:SetFeatureType(FeatureTypes.FEATURE_FOREST);
It's worked exactly expected.
But if I try same for imrovements it's not worked:
plot:SetImprovementType(ImprovementTypes.IMPROVEMENT_GOODY_HUT);
[166622.967] Runtime Error: ***.lua:279: attempt to index a nil value
stack traceback:
Where is a mistake?