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"

Add child actor component from array

I'm pretty sure the answer is simple but as I'm new with blueprints I'd like a bit help.

So I got the following blueprint which runs just fine and spawns 5 items in my select area between BP_Item and BP_Item_Red (there are more like green,yellow,black etc but it doesn't really matter)

alt text

what I want to do is set up the same thing but instead of a switch to randomly choose which actor to spawn, to be able to get the actors from an array which has them all stored and pick a random one like this

alt text

my issue is that I'm kinda lost on how to fill the array. Usually most type of arrays like "class array" which I used mostly so far with spawn actor, show up in class defaults and I can do that from there but "actor arrays" don't show up . (example below)alt text

Product Version: UE 4.10
Tags:
1.jpg (209.0 kB)
2.jpg (205.7 kB)
3.jpg (236.3 kB)
more ▼

asked Nov 27 '15 at 02:38 AM in Blueprint Scripting

avatar image

MuFeR
41 5 9 8

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

1 answer: sort voted first

Looks like your array is set up to hold 'actor references'. I believe if you wanna do it that way, the actors should already exist before you can populate your array. You can probably do that programmatically by spawning them hidden somewhere in the level and making a volume overlap trigger system to populate your array.

more ▼

answered Jan 18 '16 at 01:08 AM

avatar image

6ixpool
26 1 1 3

(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