Get Array from Actor Blueprint to Actor

How?? just HOW!!! --(hah)
I’ve been trying for 2 weeks and have not been able to get this to work. I’m sure it’s simple and there is one small thing i am missing, but can someone please tell me how to get an array from an Actor blueprint to another Actor?

It’s also worth pointing out that all methods on Blueprint actors are considered public. In this way you could maintain a private array of any type and provide access to that array through methods that can be accessed by other actors in your scene as long as they use “Cast to…” when working with your containing actor.

As RimmyD mentioned you can use “Get all Actors” or assign your variable at design-time. In order to convert any type of parameter into an array you tick the small Grid button next to the variable typename in the properties panel when you have a property selected in the blueprints editor.

what are you trying to do exactly? are you trying to go from blueprint to blueprint? are you trying to instantiate into the world?

The key is you have to have some way of getting a reference from one actor to another, this is done typically by either having a variable filled at design time (one actor in the level plugged into the public variable of another actor in the level) or by nodes such as Get All Actors Of Class.

Secondly you must make sure the Actors are being cast to the proper type. As an example, Get All Actors of Class will return an array of Actors that will need to be cast to your actual blueprint type. Just drag from an output of the Actor and find Cast to MyBlueprint. Now that your code knows the correct type you can use that reference to get a pointer to your array.

AHA!! Thank you so much RimmyD, That is EXACTLY what I needed. I Was making a variable that referenced the blueprint instead of getting the actor and casting from it. (sigh*)

So many thanks, you are awesome!!!

Is it still necessary to “Cast to (MyBlueprint)”? I’ve got the Problem, that I dont get values with the array! I just get the Length and the Name of the Var, but not the actually value…