Jump to content

Recommended Posts

On 6/11/2021 at 11:05 PM, Monti18 said:

Did you add a AddMinimapAtlas("images/map_icons/yourstructure.xml") in your modmain? Otherwise your structure has no minimap icon and won't be visible.

There is an icon on the minimap, but it is not always visible as for example Celestial Orb

-- Deerclops detection (everyone)
if GLOBAL.TheNet and GLOBAL.TheNet:GetIsServer() then
AddPrefabPostInit("deerclops", function(inst)
	inst.entity:AddMiniMapEntity()
	inst.MiniMapEntity:SetIcon("messagebottletreasure_marker.png")
	inst.icon = GLOBAL.SpawnPrefab("globalmapicon")
    inst.icon:TrackEntity(inst)
    inst.MiniMapEntity:SetCanUseCache(false)
    inst.MiniMapEntity:SetDrawOverFogOfWar(true)
  end)
end

change the names and prefabs where necessary

put in modmain.lua

Edited by Well-met
14 hours ago, Well-met said:

-- Deerclops detection (everyone)
if GLOBAL.TheNet and GLOBAL.TheNet:GetIsServer() then
AddPrefabPostInit("deerclops", function(inst)
	inst.entity:AddMiniMapEntity()
	inst.MiniMapEntity:SetIcon("messagebottletreasure_marker.png")
	inst.icon = GLOBAL.SpawnPrefab("globalmapicon")
    inst.icon:TrackEntity(inst)
    inst.MiniMapEntity:SetCanUseCache(false)
    inst.MiniMapEntity:SetDrawOverFogOfWar(true)
  end)
end

change the names and prefabs where necessary

put in modmain.lua

Thank you very much

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...