Construction Script Variable Not Editable
I've been following along this official tutorial video about construction scripts:
It is basically about how to to promote a property of a blueprint's component to a variable via a construction script so it can be editable on each individual instance. Maybe the engine has changed in the three years since the video was published or I did overlook something, but I it is not working for me. I was wondering if someone could point out my mistake.
I have a class blueprint that adds a collision box and a spot light to the scene. When an another actor overlaps with the collision box, the spot light turns on and off once it leaves it. This work great:
The problem is that when I am trying to make the light color editable on the individual instances it does not work. Seemingly everything is fine:
I've created the construction script and promoted the set Light Color function's value to a variable. Made the variable editable, gave it a default color, and compiled the blueprint.
On the instances I see the new 'Light Color' variable and I am able to edit it. When I play the scene however, the light remains colorless. What is more, not only the new instance colors do not get applied, but even the default color is forgotten. I only see 'white' light, even though both the light actor and variable have default light colors.
Here is an image of the new color applied on the instance of the blueprint:
What am I doing wrong?
It looks like the color you are putting in your instance variable has channels (looks like specifically the green one) with values higher than 1. Doing this will create a "white color" tinited towards the strength of each channel (eg. all three channels have a value over 1 but green has a higher value than the other two). Try keeping them all between 0 and 1, which in most cases is how you should have it.
answered Jan 26 '19 at 06:31 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here