Maris Posted January 13, 2015 Share Posted January 13, 2015 AddPrefabPostInit("axe",function(inst) inst:AddComponent("fuel") inst.components.fuel.fuelvalue = TUNING.SMALL_FUELend)It's ok for host. But clients still can't use that. They see an action "Add Fuel", and even can use axe on firepit, but action fails in a few seconds (no crash). How to fix it? There is no fuel component on clients.Standart initialization looks like that:local function fn() local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() MakeInventoryPhysics(inst) inst.AnimState:SetBank(.....) inst.AnimState:SetBuild(.....) inst.AnimState:PlayAnimation("idle") if not TheWorld.ismastersim then return inst end ..... inst:AddComponent("fuel") inst.components.fuel.fuelvalue = TUNING.MED_FUEL .....end Link to comment https://forums.kleientertainment.com/forums/topic/49060-custom-fuel/ 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