PocketPossum Posted January 22 Share Posted January 22 Hi! I'm making a character mod atm, and one of her main gimmicks is she can get certain foods unique to her that let her change her appearance and her stats to match other characters temporarily. I made one basic food to test it with. Its supposed to try and change her appearance, damage resist, and damage dealt to try and match Wigfrid for a bit. However, it doesn't actually do any of that. It doesn't change looks nor does it change her stats at all. It also doesn't seem to crash the game either or give me any kind of error message. local function OnEat(inst, food, feeder) if food.prefabname == "wathgrithr_blood" then inst.AnimState:OverrideSymbol("cheeks", "wathgrithr","cheeks") inst.AnimState:OverrideSymbol("face", "wathgrithr","face") inst.AnimState:OverrideSymbol("hair", "wathgrithr","hair") inst.AnimState:OverrideSymbol("hair_hat", "wathgrithr","hair_hat") inst.AnimState:OverrideSymbol("hairfront", "wathgrithr","hairfront") inst.AnimState:OverrideSymbol("hairpigtails", "wathgrithr","hairpigtails") inst.AnimState:OverrideSymbol("headbase", "wathgrithr","headbase") inst.AnimState:OverrideSymbol("headbase_hat", "wathgrithr","headbase_hat") inst.components.combat.damagemultiplier = 1.25 inst.components.health:SetAbsorptionAmount(0.75) end --Other blood effects go here. end Is the main part of the code for it that's in the character's lua file. In the master_postinit section, I also have this code. inst.components.eater:SetOnEatFn(OnEat) I'm wondering if anyone has any idea how to make this work? Should I try to redo the code inside of the food instead of the character? or is there some tiny mistake somewhere? I'm not sure. Thank you for any help. Link to comment https://forums.kleientertainment.com/forums/topic/169599-trying-to-get-effects-to-apply-to-a-character-on-eating-specific-foods-code-not-working/ Share on other sites More sharing options...
mathem99 Posted January 23 Share Posted January 23 (edited) Hmm... I think instead of using " foodname.prefabname " try using " foodname.prefab" Edited January 23 by mathem99 Link to comment https://forums.kleientertainment.com/forums/topic/169599-trying-to-get-effects-to-apply-to-a-character-on-eating-specific-foods-code-not-working/#findComment-1849839 Share on other sites More sharing options...
PocketPossum Posted January 23 Author Share Posted January 23 13 minutes ago, mathem99 said: Hmm... I think instead of using " foodname.prefabname " try using " foodname.prefab" Thank you! that worked. Link to comment https://forums.kleientertainment.com/forums/topic/169599-trying-to-get-effects-to-apply-to-a-character-on-eating-specific-foods-code-not-working/#findComment-1849843 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