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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Why can't I set default values for an array of classes (not objects) on a child blueprint?

I have a blueprint that is the parent for enemies in my game. This blueprint has an array of weapon objects and an array of weapon classes (all weapon classes are blueprints with weapon as their parent, and weapon has actor as its parent).

When the game begins, this enemy blueprint loops through the weapon classes in its weapon class array and spawns an actor of each of those classes and adds that actor to its weapons array so it can use those weapon instances during the game.

When I view the defaults tab for this generic enemy blueprint, I can modify the list of weapon classes there, but if I create a more specific enemy blueprint that has the generic enemy blueprint as a parent, the weapon classes array does not show up in the defaults for modification. If I create an instance of the more specific enemy in the world I can modify its weapon classes array in the editor, but I don't want to have to create the entire array manually for each instance of this enemy.

Why is it that I can modify the class array in the defaults of the parent class or in instances of the child class, but I can't modify it in the defaults of the child class itself, and how might I go about getting the behavior I'm looking for?

Product Version: Not Selected
more ▼

asked Jun 06 '14 at 11:10 PM in Blueprint Scripting

avatar image

6 2 5 3

avatar image Shadowriver Jun 07 '14 at 12:23 AM

You sure your array is public?

avatar image Asminthe Jun 07 '14 at 01:29 AM

It is. It is marked editable and not marked private and I can modify the value(s) of it on instances of derived classes in the details panel of the editor. The only thing I don't seem to be able to do with it is set default values for it in child blueprints.

avatar image Speuzer Oct 28 '15 at 09:46 PM

In 4.8 I'm having the same issue as OP. I have empty arrays defined in the parent class that I would like to add items to in the child class defaults. The arrays are set to public, and visible if I drop the child class in a level, but not when editing the child class blueprint.

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

1 answer: sort voted first

Is it an array of classes or objects

more ▼

answered Jun 04 '19 at 07:19 AM

avatar image

0 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