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"

Store Class Type in Blueprint variable ?

I need to store multiple different Blueprint-Actor-Classes in an Array, and spawn an instance of them on demand. Is that possible ? What type of array do I need ?

Product Version: Not Selected
Tags:
more ▼

asked Aug 08 '14 at 01:11 AM in Blueprint Scripting

avatar image

Saitho
11 3 7 9

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

3 answers: sort voted first

The answer is: You can just use class'Object' as type and put in any class you want. It will still spawn an object of the correct class.

more ▼

answered Aug 11 '14 at 12:47 PM

avatar image

Saitho
11 3 7 9

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

The purple class variable stores classes. But anytime I plug such a variable into a Spawn Actor node for the class it bugs out on me, so I don't know how it is supposed to work.

Anyway you can do it manually on the spawn actor node without the class if you run into problems with the variable as I have. Try the variable first though.

more ▼

answered Aug 08 '14 at 06:35 AM

avatar image

Zeustiak
1.8k 130 68 110

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

Maybe a little late but still :

1/ Left click your array's icon in My Blueprint / Variables Tab

2/ Type "actor"

3/ In suggestions, point "Actor" with mouse.

4/ Choose the "Class" line in the drop-down menu that appears on the right. (purple icon)

To spawn an element : AddChildActorComponent node -> plug a SetChildActorClass node from ReturnValue Pin, and whatever element of your array you want in the "InClass" pin of this same last node.

more ▼

answered Apr 22 '18 at 03:22 PM

avatar image

Jusquiame
1 1 1

(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