How to set a Lights property in Real Time

I currently have a directional light that rotates 360 degrees, i want to change the lights properties when the light rotates 180 degrees but when i put an if else statement and

Light->Intesity = 0.0f;

that doesn’t seem to do anything.

any suggestions?

Intensity is set as read only for blueprint, it most likely means most likely that it’s not meant to set in runtime

https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/Components/ULightComponentBase/Intensity/index.html

You might try SetBrightness function:

https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/Components/ULightComponent/SetBrightness/index.html