Jump to content

How do i make non edible food (nightmare fuel) be edible ?

Recommended Posts

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 ?

hiroki_none.pngLooks better in game i swear >.<

Edited by Franke004
Link to comment
Share on other sites

As you can see in gears.lua   


inst.components.edible.foodtype = FOODTYPE.GEARS

just change the FOODTYPE.


to make a custom foodtype, you can do


then add a function to component 'eater' with AddComponentPostInit

    function Eater:SetCanEatFuel()
        table.insert(self.preferseating, FOODTYPE.FUEL)
        table.insert(self.caneat, FOODTYPE.FUEL)

and call this function after eater is added to your character prefab, just like wx78.lua do.


Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...