[4.10.2] Construction Script variables can only be edited when they are exposed.

I found a bug today when using the construction script inside my blueprint. If you have a variable, string for example, you can’t set it from the construction script unless it is set to be “Editable”, which also exposes them to the Blueprint details in the world. The same is with local variables, and that is kind of weird, because I need to use a checking variable inside my construction script but it won’t work without making them editable.
Steps to reproduce:

  • Create or edit any Blueprint
  • Open up the construction script
  • Create a new variable of any type and try to set it to some value
  • You’ll see that it won’t take the value when you use the SET expression. Use Print Strings for testing that!
  • Make the variable Editable (Details panel)
  • See that its working then…

Thanks for reading :slight_smile:

Nothing spectacular… Just like you set a variable from blueprints… No error, but as I can test with print strings, the set variable node won’t set :slight_smile:
Edit: In normal event graphs, it works, but not in construction script .

What variable are you setting? What is the outcome you are seeing vs. what you expect to occur?

Hi ,

Unfortunately, I have not been able to reproduce this on my end. What specifically are you seeing on your end?

Hi ,

We have not heard from you in several days. I am marking this as answered for tracking purposes. If you are still experiencing this error, please comment with the requested information.

I get what he’s saying, just ran into this myself on 4.15 - if you want to set a variable from the construction script, you have to make it “editable”, which is not always desired because that exposes it to the property window and changing it might be dangerous.

It’s not a biggie, but it’d be nice if you could set a variable in the CS without exposing it. I notice variables now have an “expose to cinematics” checkbox that allows matinee/sequencer to modify the variable - perhaps that could be extended to also allow the actor’s construction script to modify it?

Hello ,

I was unable to reproduce this issue in 4.15.1. I was able to set an INT variable and have it print without making the variable editable. I have a couple questions to help me narrow down this issue:

  1. Can you reproduce this issue in a new project?
  2. If so, could you provide a detailed list of steps so that I can reproduce this issue on our end?
  3. Could you provide screenshots of the issue?

I also just ran into this, in this example if you have “Instance Editable” set to true, then this works as expected and sets the variable to true. If you do not have the variable “HasRun” instance editable, then it never sets the variable to true.

Hello TimB,

Thank you for submitting a bug report. I have reproduced this issue and logged a report for it here

You can track the report’s status as the issue is reviewed by our development staff. Please be aware that this issue may not be prioritized or fixed soon.

This bug report was resolved as “by design”; however, that means that there is no way to track internally whether the construction script has ever run in Blueprint without exposing the variable that you use to track it to the users in the editor, which may open up the possibility of bugs if users directly change the value of that tracking variable on the instance.

1 Like