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"

How can I make an instance-editable variable cause the Construction Script to run when it changes?

I have a blueprint that updates itself in the construction script. Part of how it updates itself depends on the value of a variable. The level designer can update that variable on each instance. After they do, they have to move that object in order for the construction script to update the object to the new variable.

Is there a way I can get the variable change itself to cause the construction script to run? Or some other way I can get the construction script to run without having to move the object? Like a button or toggle that causes it to run?

Product Version: UE 4.17
Tags:
more ▼

asked Sep 15 '17 at 05:08 PM in Blueprint Scripting

avatar image

Ecnassianer
146 1 9 10

avatar image gomi Sep 02 '18 at 01:27 PM

I do not know what you mean but when you change any parameter bp will be auto re constructed I think. At least when I change a param I observe it. To observe it, add a int param then attach const. root to print string box. That will print hello when const. happens.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Not in blueprint, in C++ you can call ExecuteConstruction

https://api.unrealengine.com/INT/API/Runtime/Engine/GameFramework/AActor/ExecuteConstruction/index.html

C++ can't detect variable changes, editor does that by on actions in property editor as well as gizmo movements, you would either need to make get or set function or detect change on tick or do construction on action that cause change of property.

more ▼

answered Sep 03 '18 at 02:39 AM

avatar image

Shadowriver
32.5k 915 162 1080

(comments are locked)
10|2000 characters needed characters left
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