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 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 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 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 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 Link to comment Share on other sites More sharing options...
boardman94 Posted November 8, 2014 Author Share Posted November 8, 2014 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. Link to comment 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 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.