I’m having trouble getting my light script to work. It’s very simple, all it does is find the light attached to the object and then changes the spotAngle to a predetermined size.
////////////This Script goes on the "MoveRangeIdentifier"
var TheLight;
var BoundingScale : int;
function Update () {
TheLight = transform.Find("MoveRangeLight").light;
if(TheActivePlayerSwitch == true){
TheLight.intensity = 8;
TheLight.spotAngle = BoundingScale;
}
}
Now it may be worth mentioning that the light type is a Directional with a hard-edged cookie attached to it. From what I read, the spotAngle on a directional light is supposed to adjust the size of the cookie.
the adjustment of the intensity works fine, but the spotAngle adjustment doesn’t work at all no matter what I try. I imagine that I’m calling it in the wrong way
If anyone can provide some insight, it’d be greatly appreciated!