In my RPG game, I’m trying to do something incredibly simple. Players have the ability to cast an AoE heal, by applying a negative radial damage value. This heals the players fine, but also heals any nearby enemies. I simply want to ignore all of the enemies. I cannot seem to do this.
What I’ve tried: On the Apply Radial Damage function, there is an ‘Ignore Actors’ array pin. This is obviously what I need to use. But I cannot create an array of enemies.
The obvious first step is to call the Get All Actors of Class function. This is fine, if I only want to ignore one enemy blueprint. But I have three types of enemies (so three blueprints). I want to ignore all of them.
Calling the ‘Get All Actors’ function three times (once for each enemy) doesn’t seem right, and neither does it work. I don’t see any way to add all of the ‘Out Actors’ pins together into a custom array. The ‘Add’ function thinks I’m adding an object to an array, not an array to an array. It also returns an integer (?!?) for some reason. The Append function lets me add two arrays together… but there’s no out pin, so I can’t send that to the Ignore Actors.
I tried creating my own Array. I created a variable, and changed the type to Actor (Array). But after compiling, I can’t add anything to the array (It says editing in a class default object is not allowed. I don’t know what that means). I can use the Get All Actors function again and set the variable, but again, that only works for one type of enemy, not all three.
If I change the variable to a class reference, I’m able to add all of the blueprints after compiling… but now the array is incompatible with the Ignore Actors pin.
I’ve been wrestling with this for over a week now. Nothing seems to work. Some help would be great.
Question: How can I put all of my enemy blueprints into a single array, and connect it to the Ignore Actors pin on Apply Radial Damage?