Spawning Actor From Class with an Array is failing?

My guess is that you are fetching all ‘current’ actors with that tag. If you don’t have any actors in that world with your tag, the array would return nothing.

What I would do is, do a ForEach loop on the returned array (get all actors with tag array) and pull the peg off and print the display name. This would show if you had any objects being returned for each tag you select.

Edit: Forgot to mention, if the array is returning nothing, try to drag that actor into the world and see if it’s able to pull the reference.

That’s as I suspected. You would need to asynchronously load those items into the game:

If you don’t mind having the memory taken up by these items (such as weapon pickups), you can create a ‘Dictionary’ in blueprints. For the ‘Key’, choose Name (FName in C++). For the reference, choose the subclass of Actor (purple peg). You can then use the dictionary variable, pass the name of the item (like the tag you used) and it will spit out the purple class peg. This can get default objects and spawn items within the world very easily.

I am able to spawn any actor class I wish within this BluePrint if I simply click the purple Class dropdown and select an actor within the Spawn Actor from Class node.

Yet… if I add a basic “Get All Actors with Tag” to this BluePrint with said Actors being properly tagged - I am unable to spawn ANYTHING. Perhaps someone could see what I am doing wrong?

Thank you for your time.


Thank you, kindly. The function “Get All Actors with Tag” seems to only get currently spawned actors. Do you have any knowledge of how to pull from an array of actors (weapon pickups for a crate drop) without spawning all said weapons in the map?