TLChangeAreaGroundTilesEx(object, int, float)

Changes the tiles of an entire area.

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

Parameters

oArea

Area to change the tiles of

nGroundTileConst

X2_TL_GROUNDTILE_*

fZOffset

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


Description

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



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 TLChangeAreaGroundTiles() instead.

This is a wrapper function for TLChangeAreaGroundTiles() that uses GetAreaSize() to automatically send the area's height and width.


Requirements

#include "x2_inc_toollib"


Version

1.67

Example

// Source code from x2_inc_toollib
// This is an extract from x2_inc_toollib and will not compile as-is

void TLChangeAreaGroundTilesEx(object oArea, int nGroundTileConst, float fZOffset = -0.4f ) { TLChangeAreaGroundTiles(oArea, nGroundTileConst, GetAreaSize(AREA_WIDTH), GetAreaSize(AREA_HEIGHT), fZOffset ); }

See Also

functions:  TLChangeAreaGroundTiles | TLResetAreaGroundTiles | TLResetAreaGroundTilesEx
categories:  Area Functions | Visual Effects Functions
constants:  X2_TL_GROUNDTILE_*
tutorials: An Introduction To TileMagic


author: Lilac Soul, Mistress, editor: Kolyana