Jump to content

How can I increase the despawn distance of structures


Recommended Posts

I would like to edit the distance that the structures disappear, so that the bug does not occur the creatures cross statues and tables
I already posted in the bug forum, but had no answer. It's been 3 weeks, so I decided to fix it by myself. If anyone helps me I will be extremely grateful

the bug i wan't to "fix"

 

Edited by chrisbq
Link to comment
Share on other sites

  • Developer

its simple:

--for walls this is called
inst.Physics:SetDontRemoveOnSleep(true)
--for other objects, its never called, so the object sleeps(which removes physics), thus allowing the creatures to get through.
--this is honestly a fair tradeoff since, marble sculptures are unbreakable for most entities, but simply run that line for any entity you want to have this property on both the client and server
--WARNING, the more entities you do this for, the laggier this will get, YOU HAVE BEEN WARNED.

 

Link to comment
Share on other sites

8 hours ago, Zarklord said:

thank you so much!


--for walls this is called
inst.Physics:SetDontRemoveOnSleep(true)
--for other objects, its never called, so the object sleeps(which removes physics), thus allowing the creatures to get through.
--this is honestly a fair tradeoff since, marble sculptures are unbreakable for most entities, but simply run that line for any entity you want to have this property on both the client and server
--WARNING, the more entities you do this for, the laggier this will get, YOU HAVE BEEN WARNED.

 

 

Edited by chrisbq
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
 Share

×
×
  • Create New...