Jump to content

[Solved] custom light source not working with cave enable


Recommended Posts

I make a custom character that can emit light, it works correctly in the world without cave enable. but no light in the world with cave. I don't know how to fix it, can someone help me.

this is code in fn function

inst.entity:AddLight()
inst.Light:SetFalloff(0.7)
inst.Light:SetIntensity(.5)
inst.Light:SetRadius(4)
inst.Light:SetColour(180 / 255, 195 / 255, 150 / 255)			
inst.Light:Enable(true)	

 

Edited by Zeroless
Link to comment
Share on other sites

I think you forgot to add this to your light source.

inst.entity:AddNetwork()

When you enable cave in the world, it becomes a dedicated server and your entity will have to enable network in order to function.

Edited by Norfeder
Link to comment
Share on other sites

5 hours ago, Norfeder said:

I think you forgot to add this to your light source.


inst.entity:AddNetwork()

When you enable cave in the world, it becomes a dedicated server and your entity will have to enable network in order to function.

Thank you for your replies, but I already add it. 

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...