DownloadALot Posted April 7, 2016 Share Posted April 7, 2016 (edited) Greetings! I am in dire need of assistance. I have been trying to make a fueled prefab that accepts specific fuel items. For instance, Logs or Living Logs alone. Problem is I cannot figure out how to do this. The only thing I can think of is using the "inst.components.fueled.fueltype" under "inst:AddComponent("fueled")". I would need to modify the Log and Living Log prefabs and add a custom fueltype to them and that would be a bad idea in general. I hope I can find an alternative solution here. Edited April 8, 2016 by DownloadALot Link to comment https://forums.kleientertainment.com/forums/topic/66152-solved-help-with-fueled-prefab-accepting-specific-fuel-items/ Share on other sites More sharing options...
DarkXero Posted April 8, 2016 Share Posted April 8, 2016 3 hours ago, DownloadALot said: The only thing I can think of is using the "inst.components.fueled.fueltype" under "inst:AddComponent("fueled")". Set it to the same fueltype as the log and living logs. Now, those, and cut grass, and twigs, etc. can burn. Include this in your prefab with specific requirements to override its CanAcceptFuelItem function: _CanAcceptFuelItem = inst.components.fueled.CanAcceptFuelItem inst.components.fueled.CanAcceptFuelItem = function(self, item) return _CanAcceptFuelItem(self, item) and (item.prefab == "log" or item.prefab == "livinglog") end Only the log and livinglog prefabs will return true. Other fuel with the same fueltype will return false. Link to comment https://forums.kleientertainment.com/forums/topic/66152-solved-help-with-fueled-prefab-accepting-specific-fuel-items/#findComment-746610 Share on other sites More sharing options...
DownloadALot Posted April 8, 2016 Author Share Posted April 8, 2016 Works like a charm. Thanks! Link to comment https://forums.kleientertainment.com/forums/topic/66152-solved-help-with-fueled-prefab-accepting-specific-fuel-items/#findComment-746624 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