Difference between revisions of "GetFirstArea"

From NWN Lexicon
Jump to: navigation, search
(Added a missing page for NWNEE)
 
(Example: Prints the name of all areas in a module to log. - example provided to shadguy by milliorn)
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Returns the first area in the module.
+
{{NWNEE}}Returns the first area in the module.
  
 
<nwscript>
 
<nwscript>
Line 15: Line 15:
  
 
===Example===
 
===Example===
{{examples needed}}
+
 
 +
<nwscript>
 +
//Prints the name of all areas in a module to log.
 +
void main()
 +
{
 +
    object oArea = GetFirstArea();
 +
    while (GetIsObjectValid(oArea))
 +
    {
 +
        WriteTimestampedLogEntry(GetName(oArea));
 +
        oArea = GetNextArea();
 +
    }
 +
}
 +
</nwscript>
  
 
===See Also===
 
===See Also===
Line 21: Line 33:
 
{| class="seealso"
 
{| class="seealso"
 
| width="1px" align="right" valign="top" | <font color="gray">functions: </font>
 
| width="1px" align="right" valign="top" | <font color="gray">functions: </font>
| [[GetNextArea]]
+
| [[GetNextArea]]()
 
|}<br />
 
|}<br />
 
----
 
----
Line 30: Line 42:
 
[[Category:Area_Functions]]
 
[[Category:Area_Functions]]
 
[[Category:Get_Data_from_Object_Functions]]
 
[[Category:Get_Data_from_Object_Functions]]
[[Category:Get_Data_Functions]]{{DISPLAYTITLE:GetFirstArea()}}
+
[[Category:Get_Data_Functions]]
 +
{{DISPLAYTITLE:GetFirstArea()}}

Revision as of 03:37, 24 June 2019

Nwnee logo.jpg Note: This article documents Neverwinter Nights: Enhanced Edition new content or changes/updates/fixes to 1.69 functions. These are all listed under the category and patches pages.
Returns the first area in the module.
object GetFirstArea();

Description

Returns the first area in the module.

Remarks

Information icon.png This section of the article is a stub. You can help the NWN Lexicon by expanding it.

Version

1.74.8149 - Note that the description of this function was omitted from the PDF release notes. The function is described in a readme in the lang/<language>/docs directory delivered with Neverwinter Nights Enhanced Edition, and in the toolset script editor.

Example

//Prints the name of all areas in a module to log.
void main() 
{
    object oArea = GetFirstArea();
    while (GetIsObjectValid(oArea))
    {
        WriteTimestampedLogEntry(GetName(oArea));
        oArea = GetNextArea();
    }
}

See Also

functions: GetNextArea()



 author: Shadguy