TeamTechs.SetHasTech (Civ5 API): Difference between revisions

From Civilization Modding Wiki
Jump to navigationJump to search
(Bot update)
 
(parameters and such)
 
Line 7: Line 7:
This is an instance method, invoke it with a colon.
This is an instance method, invoke it with a colon.
}}
}}
Gives or removes a technology from a team. Can also work on disabled techs.




=Usage=
=Usage=
<code>'''void''' TeamTechs:SetHasTech<b>(</b>{{Type5|TechType}} index, '''bool''' newValue<b>)</b></code>
<code>'''void''' TeamTechs:SetHasTech<b>(</b>{{Type5|TechType}} tech, '''bool''' giveTech<b>)</b></code>




Line 16: Line 18:
:{|
:{|
|-
|-
|valign="top" style="padding-right:6px;"|index:
|valign="top" style="padding-right:6px;"|tech:
|valign="top"| ''No description available.''
|valign="top"| ''The technology to give or remove.''
|-
|-
|valign="top" style="padding-right:6px;"|newValue:
|valign="top" style="padding-right:6px;"|giveTech:
|valign="top"| ''No description available.''
|valign="top"| ''If true, gives the team this technology. If false, removes the technology.''
|}
|}



Latest revision as of 04:38, 29 October 2014

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


Function.png This function is a member of TeamTechs.

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

Gives or removes a technology from a team. Can also work on disabled techs.


Usage

void TeamTechs:SetHasTech(TechType tech, bool giveTech)


Parameters

tech: The technology to give or remove.
giveTech: If true, gives the team this technology. If false, removes the technology.


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.