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"

Get Attached Actors Doesn't Run in Construction Script?

I'm trying to run some code in the construction script of a blueprint that manipulates all the actors attached to it. However, the array that the "Get Attached Actors" node returns is always empty.

Using the exact same code in the event graph executes as expected with the "Get Attached Actors" array getting populated with the attached actors.

Does the "Get Attached Actors" node not work when used in the construction script? If not, what is the best method for doing the equivalent?

Product Version: UE 4.12
Tags:
more ▼

asked Jul 16 '16 at 07:24 PM in Blueprint Scripting

avatar image

GaryDoesThings
38 2 6 8

avatar image Benebot Jun 14 '17 at 03:44 AM

hi Gary,

I have been struggeling with the same issue. By the moment, I found that it works if the parent class is "Static Mesh Actor", but it won't work if the parent class is "Actor". So you can use any Static mesh to create a "Static Mesh Actor" and then click "hidden in game" in the static mesh, then it will work as an empty scene where you can start to add components.

Hope it helps, Carlos

avatar image PerfectGym VR Jul 23 '18 at 12:44 PM

Still broken

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

1 answer: sort voted first

If anyone stumbles upon it.

Making a CallInEditor BP Function - can workaround this too. Simply clicking it will then "properly" work.

Adding the function in the c-script still does not change it.

more ▼

answered Aug 16 '17 at 09:00 AM

avatar image

HatiEth
11 2 5

(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