Page tree
Skip to end of metadata
Go to start of metadata



This command / function has no effect and / or is disabled in VBS4.

Introduced in

Version:1.18

Description

Description:Changes the terrain height or river height within the specified area.

Note: Height modifications are transferred using the network. By default, maps without river technology have their river level set to -50.

If the terrain is lowered to a negative value, the area is covered in water. The modified terrain / river is reset upon map change, or if resetTerrainHeights/resetTerrainHeightsWater is executed.

Effect of changeLower, changeHigher height options:

  • true, true: Any terrain / river, irrespective of the current height, is changed.
  • true, false: Only terrain / river that is lower than the new height is changed. A higher terrain / river stays the same.
  • false, true: Only terrain / river that is higher than the new height is changed. A lower terrain / river stays the same.
  • false, false: No terrain/river changes.

Syntax

Syntax:setTerrainHeightArea [pos1, pos2, height, changeLower, changeHigher, affectRivers]
Parameters:
  • pos1: Position-2 - Lower-left position of area to change.
  • pos2: Position-2 - Upper-right position of area to change.
  • height: Number - New terrain height as PositionASL.
  • changeLower: Boolean - If true, the command raises the terrain that is lower than the specified new height. If false, only higher terrain is lowered (optional, default: true).
  • changeHigher: Boolean - If true, command lowers the terrain that is higher than the specified new height. If false, only lower terrain is raised (optional, default: true).
  • affectRivers: Boolean - Determines whether terrain (false) or river (true) heights should be modified (optional, default: false) (V3.8+).
Return Value:Nothing

Examples

Examples:
setTerrainHeightArea [getpos player, player modelToWorld [20,20,0], 20];

setTerrainHeightArea [getpos player, player modelToWorld [20,20,0], 20, true, true, true];

Additional Information

See also:terrainHeightArea, setTerrainHeight, resetTerrainHeights, resetTerrainHeightsWater, setFlattenGround, setSnowHeightArea
Multiplayer:
Problems:

Notes