Loading...
  OR  Zero-K Name:    Password:   

inverted idea

1 posts, 21 views
Post comment
Filter:    Player:  
sort
2 hours ago
will this work?
function gadget:GetInfo()
    return {
        name      = "Invert Map",
        desc      = "Invert Map Height",
        author    = "SmokeDragon",
        date      = "2025-09-14",
        license   = "MIT",
        layer     = 0,
        enabled   = true
    }
end

if not gadgetHandler:IsSyncedCode() then
    return
end

function gadget:Initialize()
    local mapSizeX = Game.mapSizeX
    local mapSizeZ = Game.mapSizeZ
    local step = 8

    for x = 0, mapSizeX, step do
        for z = 0, mapSizeZ, step do
            local h = Spring.GetGroundHeight(x, z)
            Spring.SetHeightMap(x, z, -h)
        end
    end

    Spring.RecalculatePathMap()
end
+0 / -0