setTerrainHeight
Description
- Description:
Warning, this command is dangerous and if used incorrectly will cause issues.
Heightmap changes are stored in JIP queue, when doing multiple command invocations with the exact same XY positions (same number, same coordinates, order can be different) and different heights, the JIP messages will be merged which saves memory and network bandwidth and performance (each message is processed seperately) for joining clients.
If even just one position is missing or extra or different a new JIP message will be created, each new client will get the old and the new message, which costs bandwidth and performance because the client has to process both heightmap updates seperately.
JIP messages do NOT remove themselves if all positions are returned back to their original values, so if changes to different areas are done during a mission, they will accumulate in JIP queue.
setTerrainHeight should be used to set the height of an "area", and if that area should be further adjusted, the whole area should be adjusted and not just a subsection of it.- Groups:
- Diagnostic
Syntax
- Syntax:
- setTerrainHeight
- Parameters:
- [ [X, Y, NewHeight], ... ]: Array of Array in format PositionASL XY are world coordinates, and are internally converted to heightmap coordinates like so
- adjustObjects: Bool optional, default true. If true then objects on modified points are moved up/down to keep the same ATL height (Danger! Even objects in the sky above modified terrain are adjusted)
- Return Value:
- Nothing
Examples
- Example 1:
- setTerrainHeight [ [ [X, Y, NewHeight], [X2, Y2, NewHeight2], ... ], adjustObjects];
Additional Information
- See also:
- getTerrainInfo getTerrainHeight
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note