Jump to content

Recommended Posts

As the title says, the icon stops flickering when the player moves far away, but when the player is nearby, the icon flickers constantly. Why is that? How can I stop the icon from flickering?

Additionally, my image size is 64x64, and it's only 6KB.

Below is my code:

GLOBAL.setmetatable(env, { __index = function(t, k) return GLOBAL.rawget(GLOBAL, k) end })

Assets = {
    Asset("ATLAS", "images/icon_test.xml"),
}
AddMinimapAtlas("images/icon_test.xml")

AddSimPostInit(function()
    TheInput:AddKeyHandler(function(key, down)
        if TheWorld.ismastersim then return end
        if down and key == KEY_V then
            local mark = CreateEntity()
            mark.entity:AddTransform()
            mark.Transform:SetPosition(ConsoleWorldPosition():Get())
          
            mark.entity:AddMiniMapEntity()
            mark.MiniMapEntity:SetIcon("icon_test.tex")
            mark.MiniMapEntity:SetPriority(10)
        end
    end)
end)

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...