Franke004 Posted September 9, 2017 Share Posted September 9, 2017 (edited) Im making a char and after some work i got how to add upgrades like wx but i cant add them to nightmare fuel cause its not edible , how can i make it edible like in wx's case ? Looks better in game i swear >.< Edited September 9, 2017 by Franke004 Link to comment https://forums.kleientertainment.com/forums/topic/81857-how-do-i-make-non-edible-food-nightmare-fuel-be-edible/ Share on other sites More sharing options...
ptr Posted September 10, 2017 Share Posted September 10, 2017 As you can see in gears.lua Quote inst:AddComponent("edible") inst.components.edible.foodtype = FOODTYPE.GEARS just change the FOODTYPE. to make a custom foodtype, you can do FOODTYPE.FUEL = "FUEL" then add a function to component 'eater' with AddComponentPostInit function Eater:SetCanEatFuel() table.insert(self.preferseating, FOODTYPE.FUEL) table.insert(self.caneat, FOODTYPE.FUEL) self.inst:AddTag(FOODTYPE.FUEL.."_eater") end and call this function after eater is added to your character prefab, just like wx78.lua do. Link to comment https://forums.kleientertainment.com/forums/topic/81857-how-do-i-make-non-edible-food-nightmare-fuel-be-edible/#findComment-951990 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