UnitID (Civ5 Type)

From Civilization Modding Wiki
Revision as of 15:07, 19 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).


ID.png The UnitID pseudo-type is actually a regular integer. Pseudo-types do not exist in Lua, they only serve a documentation purpose on the wiki!


Used by

bool UnitMoving(PlayerID player, UnitID unit)
Button:SetVoids(PlayerID building, UnitID addToList)
Events.EndCombatSim(PlayerID attackingPlayer, UnitID attackingUnit, int attackingUnitDamage, int attackingUnitFinalDamage, int attackingUnitMaxHitPoints, PlayerID defendingPlayer, UnitID defendingUnit, int defendingUnitDamage, int defendingUnitFinalDamage, int defendingUnitMaxHitPoints)
Events.LocalMachineUnitPositionChanged(PlayerID player, UnitID unitID, Vector3 unitPosition)
Events.RunCombatSim(PlayerID attackingPlayer, UnitID attackingUnit, int attackingUnitDamage, int attackingUnitFinalDamage, int attackingUnitMaxHitPoints, PlayerID defendingPlayer, UnitID defendingUnit, int defendingUnitDamage, int defendingUnitFinalDamage, int defendingUnitMaxHitPoints)
Events.SerialEventUnitCreated(PlayerID player, UnitID unitID, int hexVec, int unitType, int cultureType, int civID, int primaryColor, int secondaryColor, int unitFlagIndex, int fogState)
Events.SerialEventUnitDestroyed(PlayerID player, UnitID unitID)
Events.SerialEventUnitSetDamage(PlayerID player, UnitID unitID, int damage, int previousDamage)
Events.SerialEventUnitTeleportedToHex(unknown i, unknown j, PlayerID player, UnitID unitID)
Events.ShowAttackTargets(PlayerID player, UnitID arg1)
Events.ShowMovementRange(PlayerID player, UnitID arg1)
Events.UnitActionChanged(PlayerID player, UnitID unitID)
Events.UnitEmbark(PlayerID player, UnitID unitID)
Events.UnitGarrison(PlayerID player, UnitID unitID, int garrisoned)
Events.UnitMarkThreatening(PlayerID player, UnitID unitID, bool mark)
Events.UnitMemberCombatStateChanged(PlayerID player, UnitID unitID, int memberID, unknown stateID)
Events.UnitMemberCombatTargetChanged(PlayerID player, UnitID unitID, int memberID, unknown targetPlayerID, unknown targetUnitID, int targetMemberID)
Events.UnitMemberOverlayAdd(PlayerID player, UnitID unitID, int memberID, unknown position)
Events.UnitMemberOverlayRemove(PlayerID player, UnitID unitID, int memberID)
Events.UnitMemberOverlayShowHide(PlayerID player, UnitID unitID, int memberID, bool show)
Events.UnitMemberPositionChanged(PlayerID player, UnitID unitID, int memberID, unknown unitPosition)
Events.UnitMoveQueueChanged(PlayerID player, UnitID unitID, bool remainingMoves)
Events.UnitSelectionChanged(PlayerID player, UnitID u, float hexX, float hexY, int k, bool isSelected, bool arg6)
Events.UnitShouldDimFlag(PlayerID player, UnitID unitID, int dim)
Events.UnitStateChangeDetected(PlayerID player, UnitID unitID, int fogState)
Events.UnitVisibilityChanged(PlayerID player, UnitID unitID, bool visible, bool checkFlag, unknown blendTime)
Game.SelectionListGameNetMessage(GameMessageType message, int data2 = -1, BuildActionType data3 = -1, UnitID data4 = -1, int flags = 0, bool alt = false, bool shift = false)
GameEvents.UnitGetSpecialExploreTarget(PlayerID player, UnitID unitID)
GameEvents.UnitSetXY(PlayerID player, UnitID unit, int x, int y)
Network.SendGiftUnit(int giftedPlayer, UnitID unitIndex)
Network.SendRenameUnit(UnitID arg0, string arg1)
Network.SendReturnCivilian(bool arg0, int giftedPlayer, UnitID unitIndex)
Unit Player:GetUnitByID(UnitID unit)
Unit Plot:GetUnit(UnitID id)
UnitID Unit:GetID()



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.