iMoanah Posted April 24, 2018 Share Posted April 24, 2018 (edited) So, my issue is rather simple but I can't seem to find any damn solution for it as I've tried everything possible I could think of. After a LOT of trial and error I've finally managed to get my mod up and running like it should, all but one little thing:My player map icon won't show up on the map. I've tried everything; Deleted the TEX and XML files, dragged the png image to another location in the images folder before dragging it back. Yet nothing worked. Hoping someone can help me out with this as it's getting on my nerves! I just want this mod to be done so I can hand it to the person I made it for! Edited April 27, 2018 by iMoanah Resolved the issue (Solutions down in the comments) Link to comment Share on other sites More sharing options...
K1NGT1GER609 Posted April 25, 2018 Share Posted April 25, 2018 (edited) Sounds like you have an error in one of the lua files, not sure if its the modmain or the character lua file. Check for the following in the modmain: Assets = { --reference Asset( "IMAGE", "images/saveslot_portraits/charactername.tex" ), Asset( "ATLAS", "images/saveslot_portraits/charactername.xml" ), AddMinimapAtlas("images/map_icons/charactername.xml") and for the character lua file: local common_postinit = function(inst) --reference inst.MiniMapEntity:SetIcon( "charactername.tex" ) check for capitalization and otherwise not many people can help you with only this amount of information. Edited April 25, 2018 by K1NGT1GER609 Link to comment Share on other sites More sharing options...
iMoanah Posted April 26, 2018 Author Share Posted April 26, 2018 (edited) On 25-4-2018 at 5:11 AM, K1NGT1GER609 said: Sounds like you have an error in one of the lua files, not sure if its the modmain or the character lua file. Check for the following in the modmain: Assets = { --reference Asset( "IMAGE", "images/saveslot_portraits/charactername.tex" ), Asset( "ATLAS", "images/saveslot_portraits/charactername.xml" ), AddMinimapAtlas("images/map_icons/charactername.xml") and for the character lua file: local common_postinit = function(inst) --reference inst.MiniMapEntity:SetIcon( "charactername.tex" ) check for capitalization and otherwise not many people can help you with only this amount of information. I've checked out both and they seem to be exactly like what you sugested to check. Even reverting the image to what it was before (back to the example character icon) didn't work. I'll hand you my codes to see for yourself if you wish, cus I'm just completely lost here. (Removed both code files for safety reasons) Edited April 27, 2018 by iMoanah Link to comment Share on other sites More sharing options...
K1NGT1GER609 Posted April 27, 2018 Share Posted April 27, 2018 Strange for character there seems to be 2 common_postinit? If thats the case combine the two by having this: local common_postinit = function(inst) inst.MiniMapEntity:SetIcon( "warren.tex" ) inst:WatchWorldState( "isday", function() SetNightVision(inst) end) inst:WatchWorldState( "isdusk", function() SetNightVision(inst) end) inst:WatchWorldState( "isnight", function() SetNightVision(inst) end) inst:WatchWorldState( "iscaveday", function() SetNightVision(inst) end) inst:WatchWorldState( "iscavedusk", function() SetNightVision(inst) end) inst:WatchWorldState( "iscavenight", function() SetNightVision(inst) end) SetNightVision(inst) end Link to comment Share on other sites More sharing options...
iMoanah Posted April 27, 2018 Author Share Posted April 27, 2018 19 hours ago, K1NGT1GER609 said: Strange for character there seems to be 2 common_postinit? If thats the case combine the two by having this: local common_postinit = function(inst) inst.MiniMapEntity:SetIcon( "warren.tex" ) inst:WatchWorldState( "isday", function() SetNightVision(inst) end) inst:WatchWorldState( "isdusk", function() SetNightVision(inst) end) inst:WatchWorldState( "isnight", function() SetNightVision(inst) end) inst:WatchWorldState( "iscaveday", function() SetNightVision(inst) end) inst:WatchWorldState( "iscavedusk", function() SetNightVision(inst) end) inst:WatchWorldState( "iscavenight", function() SetNightVision(inst) end) SetNightVision(inst) end I didn't even notice the local common was in there twice! It works perfectly now! Thank you for the help! it's much appreciated! Link to comment 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