boardman94 Posted November 8, 2014 Share Posted November 8, 2014 So I am trying to make a minimap icon for my new bush type.local function fn() local inst = CreateEntity() local trans = inst.entity:AddTransform() local anim = inst.entity:AddAnimState() local minimap = inst.entity:AddMiniMapEntity() inst:AddTag("bush") minimap:SetIcon("berrybush.png")This makes it have the same icon as a berry bush but if i try and change that to a path or to anything else it just doesn't show up. No errors.Where should I put the image, what should I code to get it to show up?Thanks Link to comment https://forums.kleientertainment.com/forums/topic/43727-minimap-icons/ Share on other sites More sharing options...
Mobbstar Posted November 8, 2014 Share Posted November 8, 2014 Did you set up an atlas (.xml file)? Link to comment https://forums.kleientertainment.com/forums/topic/43727-minimap-icons/#findComment-565423 Share on other sites More sharing options...
boardman94 Posted November 8, 2014 Author Share Posted November 8, 2014 Did you set up an atlas (.xml file)?Maybe? I tried putting one in with the inventory images.Where would I put that? Link to comment https://forums.kleientertainment.com/forums/topic/43727-minimap-icons/#findComment-565437 Share on other sites More sharing options...
Mobbstar Posted November 8, 2014 Share Posted November 8, 2014 Maybe? I tried putting one in with the inventory images.Where would I put that? An atlas is typically in the same folder as the texture, and also states what part of the image is the respective texture. Ideally, you copy one over and replace the values. Link to comment https://forums.kleientertainment.com/forums/topic/43727-minimap-icons/#findComment-565444 Share on other sites More sharing options...
DeathDisciple Posted November 8, 2014 Share Posted November 8, 2014 you can use any atlas that is loaded as an asset, but you need to specifically tell the system it should 'add' it as minimap, e.g. AddMinimapAtlas("path/to/atlas.xml") in modmain or such 2 Link to comment https://forums.kleientertainment.com/forums/topic/43727-minimap-icons/#findComment-565453 Share on other sites More sharing options...
boardman94 Posted November 8, 2014 Author Share Posted November 8, 2014 (edited) An atlas is typically in the same folder as the texture, and also states what part of the image is the respective texture. Ideally, you copy one over and replace the values.Cool. So I know how atlases work.What I need to know is how to make a custom minimap image show up.I know what code goes in the prefab but what do I put for a path?Where do I put the texture? Do I need code in modmain.lua? EDIT: Thanks @DeathDisciple I'll try that. Edited November 8, 2014 by boardman94 Link to comment https://forums.kleientertainment.com/forums/topic/43727-minimap-icons/#findComment-565454 Share on other sites More sharing options...
boardman94 Posted November 8, 2014 Author Share Posted November 8, 2014 @DeathDiscipleThanks It works great now. Link to comment https://forums.kleientertainment.com/forums/topic/43727-minimap-icons/#findComment-565463 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now