-
Notifications
You must be signed in to change notification settings - Fork 100
Lua_SyncedControl
The original height map represents the correct levels that the map should have if the map has sustained no damage and used by the restore terrain command to determine what the correct level should be.
Note that this does not affect the current height map. You will need to call LevelHeightMap to change the map's current terrain levels.
Adds the given height (which can be negative) the original height map in the specified area.
Change the original height map to a specific value in the specified area.
Restore an area of the original height map to the levels as first read from the map file.
Spring.SetOriginalHeightMapFunc( lua_function [, arg1 [, arg2 [, ... ]]] ) return: nil | number absTotalOriginalHeightMapAmountChanged
Example code:
Spring.SetHeightMapFunc(function()
for z=0,Game.mapSizeZ, Game.squareSize do
for x=0,Game.mapSizeX, Game.squareSize do
Spring.SetHeightMap( x, z, 200 + 20 * math.cos((x + z) / 90) )
end
end
end)