MemphisMyst Posted January 26, 2017 Share Posted January 26, 2017 (edited) I was wondering if it would be possible to create a character who only eats nightmare fuel to sustain his hunger, but loses a little sanity every time he eats it. Would this be possible? Edited February 10, 2017 by MemphisMyst Link to comment Share on other sites More sharing options...
MemphisMyst Posted January 27, 2017 Author Share Posted January 27, 2017 Would anyone know if there is a null option that i could use for inst.components.eater:SetDiet? Cause if there is would that be able to work if i add nightmare fuel as a edible afterwards? Link to comment Share on other sites More sharing options...
MemphisMyst Posted January 27, 2017 Author Share Posted January 27, 2017 1 hour ago, MemphisMyst said: Would anyone know if there is a null option that i could use for inst.components.eater:SetDiet? Cause if there is would that be able to work if i add nightmare fuel as a edible afterwards? Would it work if i put this in modmain.lua local FOODTYPE = GLOBAL.FOODTYPE FOODTYPE.SHADOW = "SHADOW" AddComponentPostInit("eater", function(self) function self:SetCanEatShadows() table.insert(self.preferseating, FOODTYPE.SHADOW) table.insert(self.caneat, FOODTYPE.SHADOW) self.inst:AddTag(FOODTYPE.SHADOW.."_eater") end end) AddPrefabPostInit("nightmarefuel", function(inst) if not GLOBAL.TheWorld.ismastersim then return inst end inst:AddComponent("edible") inst.components.edible.foodtype = FOODTYPE.SHADOW inst.components.edible.healthvalue = 5--CHANGE THESE 3 VALUES TO ANYTHING YOU WANT inst.components.edible.hungervalue = 10 inst.components.edible.sanityvalue = 15 end) and then this in my master_postinit inst.components.eater:SetDiet({FOODGROUP.SHADOW}) Link to comment Share on other sites More sharing options...
MemphisMyst Posted February 10, 2017 Author Share Posted February 10, 2017 So i tried to get it to work but it happens to error out every time that I try to launch as the character. Would anyone be able to give me assistance with getting the character functional and make him only eat nightmare fuel? Thanks for any pointers that you may be able to assist with. Link to comment Share on other sites More sharing options...
RedHairedHero Posted February 10, 2017 Share Posted February 10, 2017 Link to comment Share on other sites More sharing options...
MemphisMyst Posted February 11, 2017 Author Share Posted February 11, 2017 I already got it figured out; I didn't want to assign the nightmare fuel as a meat which was the issue. I have the character now fully functional and able to only eat nightmare fuel. Nothing else. 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