Jump to content

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

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

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
×
  • Create New...