Plot.GetX (Civ5 API)

From Civilization Modding Wiki
Revision as of 10:21, 20 September 2012 by DonQuich (talk | contribs) (Bot update)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

This page is a part of the Lua and UI Reference (Civ5).


Function.png This function is a member of Plot.

This is an instance method, invoke it with a colon.


Usage

int Plot:GetX()


Returned Value

No description available.


Source code samples

Too many occurences. Only 50 out of 364 are listed.

ActionInfoPanel.lua

UI/InGame/WorldView/ActionInfoPanel.lua
0110
local hex = ToHexFromGrid( Vector2(pPlot:GetX(), pPlot:GetY() ) );


Amazon_XP.lua (G&K)

DLC/Expansion/Maps/Amazon_XP.lua
0490
local adjacentPlot = Map.PlotDirection(riverPlot:GetX(), riverPlot:GetY(), DirectionTypes.DIRECTION_EAST);
0544
local adjacentPlot = Map.PlotDirection(plot:GetX(), plot:GetY(), direction);
0586
riverPlot = Map.PlotDirection(riverPlot:GetX(), riverPlot:GetY(), DirectionTypes.DIRECTION_NORTHEAST);
0591
local adjacentPlot = Map.PlotDirection(riverPlot:GetX(), riverPlot:GetY(), DirectionTypes.DIRECTION_SOUTHEAST);
0602
riverPlot = Map.PlotDirection(startPlot:GetX(), startPlot:GetY(), DirectionTypes.DIRECTION_EAST);
0618
riverPlot = Map.PlotDirection(startPlot:GetX(), startPlot:GetY(), DirectionTypes.DIRECTION_SOUTHWEST);
0668
local riverPlotX = riverPlot:GetX();
0843
local current_x = plot:GetX()
0844
local current_y = plot:GetY()
0855
local start_x = inlandCorner:GetX()
0856
local start_y = inlandCorner:GetY()


AssignStartingPlots.lua (G&K)

DLC/Expansion/Gameplay/Lua/AssignStartingPlots.lua
5198
local adjX = adjPlot:GetX();


CityStateDiploPopup.lua (G&K)

DLC/Expansion/UI/InGame/Popups/CityStateDiploPopup.lua
0614
local hex = ToHexFromGrid(Vector2(pPlot:GetX(), pPlot:GetY()));


CityView.lua

UI/InGame/CityView/CityView.lua
1696
local plotX = plot:GetX();
1729
local hexPos = ToHexFromGrid( Vector2( plot:GetX(), plot:GetY() ) );
1824
Events.SerialEventHexHighlight( ToHexFromGrid( Vector2( plot:GetX(), plot:GetY() ) ), false, Vector4( 0.0, 1.0, 0.0, 1 ) );
1838
if (pCity:CanBuyPlotAt(plot:GetX(), plot:GetY(), false)) then
1841
local iPlotCost = pCity:GetBuyPlotCost( plot:GetX(), plot:GetY() );
1848
elseif (pCity:CanBuyPlotAt(plot:GetX(), plot:GetY(), true)) then


EnemyUnitPanel.lua

UI/InGame/WorldView/EnemyUnitPanel.lua
0611
local pFireSupportUnit = pMyUnit:GetFireSupportUnit(pTheirUnit:GetOwner(), pToPlot:GetX(), pToPlot:GetY());


FractalWorld.lua

Gameplay/Lua/FractalWorld.lua
0330
currentX = nextPlot:GetX();


InGame.lua

UI/InGame/InGame.lua
0458
local evalPlotX = evalPlot:GetX();


InGame.lua (G&K)

DLC/Expansion/UI/InGame/InGame.lua
0271
local iPlotX = pPlot:GetX();


MapmakerUtilities.lua

Gameplay/Lua/MapmakerUtilities.lua
0381
local adjX = NEPlot:GetX();
0409
local adjX = SWPlot:GetX();
0418
local adjX = WPlot:GetX();
0427
local adjX = NWPlot:GetX();


PlotHelpText.lua

UI/InGame/WorldView/PlotHelpText.lua
0058
TextString = TextString .. tostring(plot:GetX());


PlotMouseoverInclude.lua (G&K)

DLC/Expansion/UI/InGame/PlotMouseoverInclude.lua
0018
if (iQuestData1 == plot:GetX() and iQuestData2 == plot:GetY()) then


TurnsRemaining.lua - DLC_02 DLC

DLC/DLC_02/Scenarios/NewWorldScenario/TurnsRemaining.lua
0089
if (pPlayer1:GetStartingPlot():GetX() < 50 and pPlayer2:GetStartingPlot():GetX() > 50) then
0335
if (pLoopPlayer:IsAlive() and pLoopPlayer:GetStartingPlot():GetX() > 50) then
0338
unit = pLoopPlayer:InitUnit (iUnitID, pLoopPlayer:GetStartingPlot():GetX(), pLoopPlayer:GetStartingPlot():GetY());
0446
if (newPlayer:GetStartingPlot():GetX() < 50) then
0448
elseif (oldPlayer:GetStartingPlot():GetX() < 50 and newPlayer:GetStartingPlot():GetX() > 50) then


TurnsRemaining.lua - DLC_04 DLC

DLC/DLC_04/Scenarios/1066Scenario/TurnsRemaining.lua
0092
if (playerStartPlot:GetX() == iLondonX and playerStartPlot:GetY() == iLondonY) then
0353
if (playerStartPlot:GetX() == 59 and playerStartPlot:GetY() == 39) then
0363
if (playerStartPlot:GetX() == 44 and playerStartPlot:GetY() == 0) then
0518
unit = player:InitUnit (iUnitID, playerStartPlot:GetX(), playerStartPlot:GetY(), UNITAI_RANGED, DirectionTypes.DIRECTION_WEST);


TurnsRemaining.lua (G&K)

DLC/Expansion/Scenarios/MedievalScenario/TurnsRemaining.lua
0817
SetPersistentProperty("JerusalemX", pJerusalemPlot:GetX());
1036
print ("Team: ", iTeam, "; Revealing x: ", pPlot:GetX(), ", y: ", pPlot:GetY());
1042
local adjPlot = Map.PlotDirection(pPlot:GetX(), pPlot:GetY(), direction);
1070
local capital = pPlayer:InitCity(startPlot:GetX(), startPlot:GetY());
1147
SetZurichLocation(startPlot:GetX(), startPlot:GetY());
1153
SetVaticanLocation(startPlot:GetX(), startPlot:GetY());


TurnsRemaining.lua (G&K)

DLC/Expansion/Scenarios/SteampunkScenario/TurnsRemaining.lua
0850
local pUnit = pPlayer:InitUnit(eUnitType, pPlot:GetX(), pPlot:GetY());


TutorialChecks.lua

Tutorial/TutorialChecks.lua
1432
local iX = pPlot:GetX();
1560
if (Map.PlotDistance(pFirstUnitPlot:GetX(), pFirstUnitPlot:GetY(), pSecondUnitPlot:GetX(), pSecondUnitPlot:GetY()) <= iMovesLeft ) then


UnitFlagManager.lua

UI/InGame/UnitFlagManager.lua
1033
local cityFlagInstance = g_CityFlags[ pPlot:GetX() .. " " .. pPlot:GetY() ];
1039
g_CityFlags[ pPlot:GetX() .. " " .. pPlot:GetY() ] = cityFlagInstance;
1042
local worldPos = Vector4( GridToWorld( pPlot:GetX(), pPlot:GetY() ) );


WorldView.lua

UI/InGame/WorldView/WorldView.lua
0162
local unit = player:InitUnit(g_UnitPlopper.UnitType, plot:GetX(), plot:GetY());



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.