Hbulat35 Posted February 14, 2022 Share Posted February 14, 2022 (edited) In world without caves mod works great. But in world with caves it disappears when character built this. Why? armorstand.zip Edited February 15, 2022 by Hbulat35 Link to comment https://forums.kleientertainment.com/forums/topic/137549-custom-structure-disappears-in-world-with-caves/ Share on other sites More sharing options...
CarlZalph Posted February 15, 2022 Share Posted February 15, 2022 @Hbulat35 The general order for prefab creation is: CreateEntity, entity:Add*, common, Pristine, return if not mastersim, server-side components, onsave/onload. So look at prefabs/magic_hanger_parts.lua from your mod here. Both headfn and bodyfn use simple as a basis for the prefab which is fine. However, none of these are using the Pristine state. Then there's the issue with bodyfn not exiting out if it's not mastersim, which will cause a client runtime exception later when the client sees this prefab due to a non-existing component. Link to comment https://forums.kleientertainment.com/forums/topic/137549-custom-structure-disappears-in-world-with-caves/#findComment-1540143 Share on other sites More sharing options...
Hbulat35 Posted February 15, 2022 Author Share Posted February 15, 2022 5 hours ago, CarlZalph said: @Hbulat35 The general order for prefab creation is: CreateEntity, entity:Add*, common, Pristine, return if not mastersim, server-side components, onsave/onload. So look at prefabs/magic_hanger_parts.lua from your mod here. Both headfn and bodyfn use simple as a basis for the prefab which is fine. However, none of these are using the Pristine state. Then there's the issue with bodyfn not exiting out if it's not mastersim, which will cause a client runtime exception later when the client sees this prefab due to a non-existing component. What do you mean, Pristine? Do you mean inst.entity:SetPristine()? Or something else? I don't understand why is this happening. What is the difference between worlds with and without caves? Link to comment https://forums.kleientertainment.com/forums/topic/137549-custom-structure-disappears-in-world-with-caves/#findComment-1540160 Share on other sites More sharing options...
Hbulat35 Posted February 15, 2022 Author Share Posted February 15, 2022 I've added SetPristine() and AddNetwork() and it starts working. @CarlZalph thank you very much! Link to comment https://forums.kleientertainment.com/forums/topic/137549-custom-structure-disappears-in-world-with-caves/#findComment-1540162 Share on other sites More sharing options...
Hbulat35 Posted February 15, 2022 Author Share Posted February 15, 2022 Custom actions isn't working now Link to comment https://forums.kleientertainment.com/forums/topic/137549-custom-structure-disappears-in-world-with-caves/#findComment-1540168 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