Plot.SetNEOfRiver (Civ5 API): Difference between revisions

From Civilization Modding Wiki
Jump to navigationJump to search
(Bot update)
 
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:


{{TypeInfos5|Function.png|This function is a member of {{Type5|Plot}}.<br/>
{{TypeInfos5|Function.png|This function is a member of {{Type5|Plot}}.<br/>
This is an instance method, invoke it with a colon.
This is an instance method, invoke it with a colon.<br/>
Places a river on the southwest side of this plot.
}}
}}




=Usage=
=Usage=
<code>'''void''' Plot:SetNEOfRiver<b>(</b>'''bool''' newValue<b>)</b></code>
<code>'''void''' Plot:SetNEOfRiver<b>(</b>'''bool''' newValue, '''{{Type5|FlowDirectionType}}''' flowDirection<b>)</b></code>
 
Note that this function is placing a river on the southwest side of the plot not the northeast side. The function name is a bit confusing, but just remember that it's saying the plot is relative to the river and not the other way around.




Line 17: Line 20:
|-
|-
|valign="top" style="padding-right:6px;"|newValue:
|valign="top" style="padding-right:6px;"|newValue:
|valign="top"| ''No description available.''
|valign="top"| ''Not sure what this does but it always seems to be set to true.''
|-
|valign="top" style="padding-right:6px;"|flowDirection:
|valign="top"| ''The direction the river is flowing. Will be either FLOWDIRECTION_NORTHWEST or FLOWDIRECTION_SOUTHEAST. If your river is flowing the wrong way, you can reverse it by using the opposite direction. See {{Func5|GetOppositeFlowDirection}}.''
|}
|}


=Source code samples=
=Source code samples=

Latest revision as of 23:39, 28 January 2014

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.
Places a river on the southwest side of this plot.


Usage

void Plot:SetNEOfRiver(bool newValue, FlowDirectionType flowDirection)

Note that this function is placing a river on the southwest side of the plot not the northeast side. The function name is a bit confusing, but just remember that it's saying the plot is relative to the river and not the other way around.


Parameters

newValue: Not sure what this does but it always seems to be set to true.
flowDirection: The direction the river is flowing. Will be either FLOWDIRECTION_NORTHWEST or FLOWDIRECTION_SOUTHEAST. If your river is flowing the wrong way, you can reverse it by using the opposite direction. See GetOppositeFlowDirection.

Source code samples

Redundant occurences have been removed.

Amazon_XP.lua (G&K)

DLC/Expansion/Maps/Amazon_XP.lua
0483
riverPlot:SetNEOfRiver(true, thisFlowDirection);



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.