TLResetAreaGroundTiles

From NWN Lexicon

Contents

[edit] TLResetAreaGroundTiles(object, int, int)

Removes tile magic visual effects from an area.

void TLResetAreaGroundTiles(
    object oArea,
    int nColumns,
    int nRows
);

[edit] Parameters

oArea

Area to remove the tile magic from.

nColumns

Columns in the area.

nRows

Rows in the area.


[edit] Description

Remove any ground area tiles created with TLChangeAreaGroundTiles in current area.



[edit] Remarks

nColumns and nRows are the size of the area. For instance, a 4 * 6 area has 4 columns and 6 rows.

This removes visual effects by destroying all placeables tagged "x2_tmp_tile" in the area. This tag is automatically assigned to all the invisible objects created with TLChangeAreaGroundTiles.


[edit] Requirements

#include " x2_inc_toollib "

[edit] Version

1.61

[edit] Example

// In the area created for the TLChangeAreaGroundTiles example create a trigger,
// add this script to the trigger's OnEnter event. When the a PC (or creature)
// enters the trigger the TileMagic effect will be removed.
 
// This script will actually work from any object event except the module events.
 
#include "x2_inc_toollib"
 
void main()
{
    object oArea = GetArea(OBJECT_SELF);
 
    // We only want to remove tilemagic if it already exists.
    if(GetLocalInt(oArea, "TILEMAGIC_APPLIED") == TRUE)
    {
        // Clear the 3x3 square of tilemagic effects: the square starts in the
        // area's bottom left corner and extends x columns right and y rows up.
        TLResetAreaGroundTiles(oArea, 3, 3);
 
        // Remove the variable so the tilemagic can be reapplied.
        DeleteLocalInt(oArea, "TILEMAGIC_APPLIED");
    }
}

[edit] See Also

functions: 

TLChangeAreaGroundTilesEx

tutorials: 

An Introduction To TileMagic



 author: Lilac Soul, editors: Mistress, Sunjammer, Axe Murderer
 

Personal tools
Categories