Map.PlotDistance (Civ5 API)
This page is a part of the Lua and UI Reference (Civ5).
This function is a member of Map. This is a static method, invoke it with a dot. |
Usage
int Map.PlotDistance(int x, int y, int xOffset, int yOffset)
Returned Value
- No description available.
Parameters
x: No description available. y: No description available. xOffset: No description available. yOffset: No description available.
Source code samples
Redundant occurences have been removed.
CityStateDiploPopup.lua
UI/InGame/Popups/CityStateDiploPopup.lua
0307
|
local plotDistance = Map.PlotDistance(thisX, thisY, plotX, plotY); |
EnemyUnitPanel.lua (G&K)
DLC/Expansion/UI/InGame/WorldView/EnemyUnitPanel.lua
0931
|
local plotDistance = Map.PlotDistance(pCapital:GetX(), pCapital:GetY(), pMyUnit:GetX(), pMyUnit:GetY()); |
1480
|
local plotDistance = Map.PlotDistance(pCapital:GetX(), pCapital:GetY(), pTheirUnit:GetX(), pTheirUnit:GetY()); |
1821
|
local plotDistance = Map.PlotDistance(pCapital:GetX(), pCapital:GetY(), theirUnit:GetX(), theirUnit:GetY()); |
GenericWorldAnchor.lua
UI/InGame/GenericWorldAnchor.lua
0142
|
local plotDistance = Map.PlotDistance(iPlotX, iPlotY, plotX, plotY); |
TurnsRemaining.lua - DLC_02 DLC
DLC/DLC_02/Scenarios/NewWorldScenario/TurnsRemaining.lua
0556
|
iDistance = Map.PlotDistance(1, iY, pUnit:GetX(), pUnit:GetY()); |
TurnsRemaining.lua - DLC_04 DLC
DLC/DLC_04/Scenarios/1066Scenario/TurnsRemaining.lua
0109
|
if (Map.PlotDistance(pCity:GetX(), pCity:GetY(), iLondonX, iLondonY) < 8) then |
TurnsRemaining.lua (G&K)
DLC/Expansion/Scenarios/MedievalScenario/TurnsRemaining.lua
1587
|
if (Map.PlotDistance(pReformerCity:GetX(), pReformerCity:GetY(), pCity:GetX(), pCity:GetY()) <= 10) then |
TutorialChecks.lua
Tutorial/TutorialChecks.lua
1560
|
if (Map.PlotDistance(pFirstUnitPlot:GetX(), pFirstUnitPlot:GetY(), pSecondUnitPlot:GetX(), pSecondUnitPlot:GetY()) <= iMovesLeft ) then |
WorldBuilderRandomItems.lua
Gameplay/Lua/WorldBuilderRandomItems.lua
0089
|
if (Map.PlotDistance(plotX, plotY, otherPlot:GetX(), otherPlot:GetY()) <= uniqueRange) then |
The initial version of this page was created by the Civ5 API Bot, see the Civ5 API Reference FAQ. Some of the texts come from the 2kgames' wiki and most of code samples are copyrighted to Firaxis.
Functions' signatures were either copied from the 2kgames' wiki, or infered from the Lua source files and the binaries. Errors are possible.
Contributors may find help in the Contributors guide to the Civ5 API.