Andmann Posted July 31, 2016 Share Posted July 31, 2016 (edited) in regards to this I want to add support for custom Icons that will hover over the character depending on his faction. The code is all setup but I don't know how to convert my own Icon into a usable anim. Right now I'm using someone elses Icons to test my work D: could someone point me to a creation tool or a guide? Edited July 31, 2016 by Andmann Link to comment Share on other sites More sharing options...
Serpens Posted July 31, 2016 Share Posted July 31, 2016 (edited) what do you need exactly? A tool to make png to tex and tex do png is this: http://forums.kleientertainment.com/files/file/73-matts-tools/ And I did not used it, but I guess for animations you can use: Steam\steamapps\common\Don't Starve Mod Tools\mod_tools\Spriter\Spriter.exe Edited July 31, 2016 by Serpens Link to comment Share on other sites More sharing options...
Andmann Posted July 31, 2016 Author Share Posted July 31, 2016 well to be concrete: I want those images to pop up over the heads of any character with a faction. the way I'm doing that is to create a new prefab which has the respective player as a parent. function faction:SetFaction(newfaction) -- toDo: newfaction type == string? self.faction = newfaction -- remove icon, else potential crash ^_^ if self.inst.icon ~= nil then self.inst.icon:Remove() self.inst.icon = nil end -- add icon to faction ToDo: add support for any faction if self.faction == "blue" or self.faction == "red" then self.inst.icon = SpawnPrefab(self.faction.."_faction") self.inst.icon.entity:SetParent(self.inst.entity) self.inst.icon.Transform:SetPosition(0,3,0) end TheNet:Announce(self.inst:GetDisplayName().." has changed faction to "..self.faction) end well this new prefab will of course need some way of showing itself. So i used a static animation from someone else to test everything. and so far it seems perfectly fine. But I struggle with creating my own icons / anim. I made two samples for testing - attached them ^^ well, I suppose I am doing somewthing wrong with the spriter So I attached the scml project as well and the compilation the game creates from it red_faction.zip blue_faction.zip blue_faction.scml red_faction.scml Link to comment Share on other sites More sharing options...
Andmann Posted July 31, 2016 Author Share Posted July 31, 2016 (edited) alright I did it ^__^ the animation had the wrong name: it should have been "Idle" Edited July 31, 2016 by Andmann 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