x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Construction Script Variable Not Editable

Hi all,

I've been following along this official tutorial video about construction scripts:

https://www.youtube.com/watch?v=z1SD-d9yJmQ

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:

alt text

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.

alt text

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:

alt text

What am I doing wrong?

Product Version: UE 4.21
Tags:
more ▼

asked Jan 26 '19 at 05:01 PM in Blueprint Scripting

avatar image

RinceArt
3 1 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered Jan 26 '19 at 06:31 PM

avatar image

Lolxh4
81 1 5 2

avatar image RinceArt Jan 27 '19 at 08:12 AM

Yes, this was the problem. Thank you. Although, it is a little weird because, when I use the color picker and move the pointer on the color wheel, it does give me values higher than 1.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question