Jump to content

How to show/hide icons of some items on the map?

Recommended Posts

It's needed for my Killer's Traps mod. Somthing like this:

if inst.is_visible then     -- code for showing icon on the mapelse     -- hide iconend

​Now I just made "no_icon.png" (64x64 image 100% transparent) and just replaced original icon:

	AddPrefabPostInit("trap_teeth",function(inst)		local minimap = inst.entity:AddMiniMapEntity()		minimap:SetIcon("no_icon_64.tex")

​And I'm not sure about second AddMiniMapEntity execution. Will it return existing variable or create new?

Edited by Maris
Link to comment
Share on other sites

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