KingWooster Posted December 26, 2014 Share Posted December 26, 2014 Hi guys I am making my custom character and one of her perks is eating a carrot and leveling up like WX78. I wrote the script almost exactly like the one in WX78 except changed the food line. if food and food components.edible and food.components.edible.foodtype=="carrot" then I used carrot and played the game and whenever I ate a carrot it didn't level me up, it just functioned like a normal carrot. I changed "carrot" to "meat" and the leveling up worked just fine. is there a way for me to get carrots to work? if so pls help!This is in DST, I came over here because the people there wouldn't reply also I used the esctemplate by "Dragon Wolf Leo" as the base. Link to comment https://forums.kleientertainment.com/forums/topic/47563-custom-charater-help/ Share on other sites More sharing options...
Mobbstar Posted December 26, 2014 Share Posted December 26, 2014 carrots are not a foodtype but a food try food.prefab == "carrot", although "carrot" may be the planted one, I'm too busy to check. Link to comment https://forums.kleientertainment.com/forums/topic/47563-custom-charater-help/#findComment-592875 Share on other sites More sharing options...
KingWooster Posted December 26, 2014 Author Share Posted December 26, 2014 Thank you for your reply. And yes I think the problem is that "carrot" refers to the planted one.i changed to food.prefab and it gave me an error saying "food" was defined by "nil" Link to comment https://forums.kleientertainment.com/forums/topic/47563-custom-charater-help/#findComment-593115 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