GridToWorld (Civ5 API)

From Civilization Modding Wiki
Jump to navigationJump to search

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


Function.png This function is a built-in global function. No include statement is needed.


Usage

int, int, int GridToWorld(ResourceType gridX, int gridY)


Returned Values

No description available.

Parameters

gridX: No description available.
gridY: No description available.


Source code samples

Redundant occurences have been removed.

PathHelpManager.lua

UI/InGame/WorldView/PathHelpManager.lua
0036
local worldPosX, worldPosY, worldPosZ = GridToWorld( data.x, data.y );


ResourceIconManager.lua

UI/InGame/ResourceIconManager.lua
0053
local x, y, z = GridToWorld( gridX, gridY );


UnitFlagManager.lua

UI/InGame/UnitFlagManager.lua
0242
local worldPosX, worldPosY, worldPosZ = GridToWorld( pUnit:GetX(), pUnit:GetY() );
1042
local worldPos = Vector4( GridToWorld( pPlot:GetX(), pPlot:GetY() ) );


UnitMemberOverlay.lua

UI/InGame/UnitMemberOverlay.lua
0134
local worldPosX, worldPosY, worldPosZ = GridToWorld( o.m_Unit:GetX(), o.m_Unit: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.