That was it. Thanks again.
I may have run into another issue. I couldn’t check earlier because I’d only had one cube set up. I’ve now started setting up the others; when trying to add them to the array it’s telling me they’re not compatible.
The Cubes which the user clicks, aren’t just static mesh cubes, they’re blueprints with a cube inside them. Would this be causing the issue?
Because I’m going to have many more blueprints, can I do the Get All Actors with Tag to create the array?
I know, right. BPs are not always helpful…
Because I’m going to have many more blueprints, can I do the Get All Actors with Tag to create the array?
Yes. It would be just fine as this nodes returns base actor type.
The cube 1 & 2 are of different type - different classes. We need to find the common denominator. Assuming you’re not using inheritance, you need to ensure that the array type is of Actor
type so it can accepts any derived classes.
If you’re using UE5, you may be able to do do this:
Disconnect it all, right click the pin, choose actor as type instead of a wildcard:
This does not work in UE4 for the Make Array
node, sadly. In case it also does not work in UE5, you can do it like so:
Create a dummy variable of Actor type and plug it in, it will convert the rest of the nodes to that type. You can then connect the cubes and get rid of the dummy.
Fortunately I am in UE5.
I’m able to change the Option Pins to Actor, but the Index remains - I can’t change it to Actor or remove it.
Can you show it? What index? Do not use the select node. I used it to demo as this behaviour does not work for Make Array
in UE4 which I run. Use the Make Array node only.
Or just Get All with Tag if it’s applicable here.
I think the 2nd option - to create the dummy actor - has worked. I’ve been able to connect them all to the array that way.
Yep it appears to be functioning. Thanks again…again.