Difference between revisions of "DestroyArea"

From NWN Lexicon
Jump to: navigation, search
m (added new category)
(Remarks)
Line 16: Line 16:
  
 
===Remarks===
 
===Remarks===
{{stub section}}
+
If the area is destroyed while there are players transitioning into it, the players in question will get their client to be stuck at loading screen indefinitely. It is recommended to add safety measures to avoid this situation.
  
 
===Version===
 
===Version===

Revision as of 00:13, 18 April 2020

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.
Destroys the given area object and everything in it.
int DestroyArea(
    object oArea
);

Description

Destroys the given area object and everything in it. Return values:

 0: Object not an area or invalid.
-1: Area contains spawn location and removal would leave module without entrypoint.
-2: Players in area.
 1: Area destroyed successfully.

Remarks

If the area is destroyed while there are players transitioning into it, the players in question will get their client to be stuck at loading screen indefinitely. It is recommended to add safety measures to avoid this situation.

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

Information icon.png This article is in need of examples. You can help the NWN Lexicon by showing how to use this code effectively.

See Also

functions: CopyArea() CreateArea() SetTransitionTarget()



 author: Shadguy