User Tools

Site Tools


4rpl:commands:setterraininrange

Index

SetTerrainInRange

SetTerrainInRange(<-cellX <-cellZ <-minTerrainHeight <-maxTerrainHeight <-radius <-isSquare <-fillRatio)

Description

Sets the heights of the terrain within the radius of specified integer map coordinates. A value of 0 for terrainHeight means “void” or no terrain. If the min and max heights are different, a random height will be chosen in the range from [min,max]. The isSquare parameter is a boolean indicating where to fill terrain in a square (true) or a circle (false) from the specified coordinates. The fillRatio is a float in the range [0,1]. A value of 1 means to change the height of every cell in range. A value of 0 means to do nothing. Values in between will affect a partial amount of terrain cells in range.

Note: Changing the terrain will cause the terrain to redraw and nearby units to recalculate line of sight and other data.

Examples

SetTerrainInRange(42 23 5 7 20 false 0.5)

Index

4rpl/commands/setterraininrange.txt · Last modified: 2023/03/25 09:30 by Kalli