InniePanda Posted January 5, 2018 Share Posted January 5, 2018 Hello everyone! I create a character for DST and I have a question.So... I want to know can I give to my character a special aura while he wears garland? This aura should raise up the sanity for my character and for other nearby players. So.Can I do it? And...can my character has an aura that makes him glowing in case sanity>80%? I will be waiting for answers! Link to comment Share on other sites More sharing options...
K1NGT1GER609 Posted January 9, 2018 Share Posted January 9, 2018 Here's a start: local function CalcSanityAura(inst) local equip = inst.components.inventory:GetEquippedItem(EQUIPSLOTS.HEAD) if (equip ~= nil) and (equip.prefab == "flowerhat") and (inst.components.sanity:GetPercent() > .8) then --glowing code? return TUNING.SANITYAURA_SMALL elseif equip ~= nil and equip.prefab == "flowerhat" then return TUNING.SANITYAURA_SMALL --you can put tiny,small,med,large but in all caps end end local master_postinit = function(inst) --just reference where things go more or less inst:AddComponent("sanityaura") inst.components.sanityaura.aurafn = CalcSanityAura First off this is the don't starve mod forums very different from don't starve together mod forums, next is you should probably explain glowing. Does it mean you emit a light around you? Does it mean your character's actual artwork gets a color tint? I'm not sure how to implement it properly. Link to comment Share on other sites More sharing options...
InniePanda Posted January 11, 2018 Author Share Posted January 11, 2018 On 09.01.2018 at 2:50 AM, K1NGT1GER609 said: Here's a start: local function CalcSanityAura(inst) local equip = inst.components.inventory:GetEquippedItem(EQUIPSLOTS.HEAD) if (equip ~= nil) and (equip.prefab == "flowerhat") and (inst.components.sanity:GetPercent() > .8) then --glowing code? return TUNING.SANITYAURA_SMALL elseif equip ~= nil and equip.prefab == "flowerhat" then return TUNING.SANITYAURA_SMALL --you can put tiny,small,med,large but in all caps end end local master_postinit = function(inst) --just reference where things go more or less inst:AddComponent("sanityaura") inst.components.sanityaura.aurafn = CalcSanityAura First off this is the don't starve mod forums very different from don't starve together mod forums, next is you should probably explain glowing. Does it mean you emit a light around you? Does it mean your character's actual artwork gets a color tint? I'm not sure how to implement it properly. Thank you so much <3 Yes, I mean emit a light around the character. Link to comment Share on other sites More sharing options...
K1NGT1GER609 Posted January 12, 2018 Share Posted January 12, 2018 I can't quite make the character spawn light around the character,it's better for you ask in the don't starve together forum. Doubt you'll get much help in this forum. 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.