Has anyone used this method of Plot object? I wrote test lua module:
And after several turns got such output:
0 true 90
S false 90
0 false 180
0 false 270
and so on. As we see, no progress changing after using ChangeBuildProgress() method. In game also no changing in remaining turns. What сould be wrong here?
P.S. I use VP mod.
Code:
function RoadBuilding (iPlayer, iUnit, iX, iY, iBuild, bStarting)
local pPlot = Map.GetPlot(iX, iY);
print (iBuild, bStarting, pPlot:GetBuildProgress(iBuild))
if bStarting then
local pPlayer = Players[iPlayer]
local ret = pPlot:ChangeBuildProgress(iBuild, 2000, pPlayer:GetTeam())
-- ret = pPlot:ChangeBuildProgress(iBuild, 200) -- this also don't work
print ('S', ret, pPlot:GetBuildProgress(iBuild))
end
end
GameEvents.PlayerBuilding.Add(RoadBuilding)
0 true 90
S false 90
0 false 180
0 false 270
and so on. As we see, no progress changing after using ChangeBuildProgress() method. In game also no changing in remaining turns. What сould be wrong here?
P.S. I use VP mod.
Last edited: