TLChangeAreaGroundTilesEx

From NWN Lexicon

Contents

[edit] TLChangeAreaGroundTilesEx(object, int, float)

Changes the tiles of an entire area.

void TLChangeAreaGroundTilesEx(
    object oArea,
    int nGroundTileConst,
    floatfZOffset = -0.4f
);

[edit] Parameters

oArea

Area to change the tiles of

nGroundTileConst

X2_TL_GROUNDTILE_*

fZOffset

Z-axis coordinate for the tile magic. (Default: -0.4f)


[edit] Description

Change the type of the ground or (by default) sub ground tiles (i.e. water) to the specified type.



[edit] Remarks

This function will flood the entire area with the tile in question.

This function will give you a pretty good idea how to use the tile magic (tm). Basically, you just create an invisible object in the center of a tile, and apply a permanent visual effect to that invisible object.

If you do not want to flood your entire area, use GetAreaSize to automatically send the area's height and width.


[edit] Requirements

#include " x2_inc_toollib "


[edit] Version

1.67

[edit] Example

// Source code from x2_inc_toollib
// This is an extract from x2_inc_toollib and will not compile as-is<br /><br />
void TLChangeAreaGroundTilesEx(object oArea, int nGroundTileConst, float fZOffset = -0.4f )
{
    TLChangeAreaGroundTiles(oArea, nGroundTileConst, GetAreaSize(AREA_WIDTH), GetAreaSize(AREA_HEIGHT), fZOffset );
}

[edit] See Also

functions: 

TLResetAreaGroundTilesEx

constants: 

X2_TL_GROUNDTILE_*

tutorials: 

An Introduction To TileMagic



author: Lilac Soul, Mistress, editor: Kolyana

Personal tools
Categories