BP_Interfaces and random events with Child Actor Blueprints

Hi all,

I am working on a system in which I have several BP actors as child actors in a parent BP.
They all have a BP interface. I want to press a single key to fire the events of BP child actors in a random (and a non-repeating the same items) way.

So when my character overlaps with the Parent BP, I can repeatedly hit enter until all my child actors are fired.
The system seems to work except the randomization part. However, when applied to a simpler system, the randomization part works just fine, and I have been using that script in other places and it does remove the items from the array as intended.

My blueprint is entirely is in Character BP (except the child actors).
Here are the screenshots:




What am I missing? I tried to place randomization part into the parent BP, but it won’t let me to use the child actor interfaces inside of parent.

Thank you all for any suggestions!!

You can use the child interfaces, by dragging off the child reference and using ‘get child actor’, then calling the interface on that.

1 Like

I think I am already doing exactly that in my BP when I get all child actors and branch with “Does Implement Interface”. I am not sure how it resolves my randomization issue.

OK, sorry, the blueprints are too small to read :slight_smile:

I will come back with some code in a while.

Ok, if you want to make an interface call to random child actors, until they’re used up

Thank you, I will test it asap, is this script inside the parent or in player character?

Edit: It does not work for me if I have it in my player character. Please see the script, I tried to zoom in more. My previous randomization script actually worked better somehow…
the one on the screenshot activates the BPIs on multiple child actors simultaneously instead of going through one by one.
**


**