How to make my banana counter destroy actor on 10

I can collect the bananas with it adding 1, but when it gets to 10 I want it to destroy an actor. Can anyone help?

Is the player collecting banana blueprints?

ClockworkOcean is correct, you’re looking for blueprint communications.

I think, though, you wanted to remove a barrier when the 10th is collected.
So first thing, go to your barrier blueprint and add a custom event to remove it.
I have this one just sinking into the ground then destroying.

Next, have the banana actor check on being picked up, if 10 total have been.
Either way, destroyactor to remove the banana since it has been picked up.
(I like an emitter for picking up objects)

If it is 10th, call the removal event in the barrier actor.
Since ClockworkOcean’s example showed the one way, I’ll show another to reach other blueprints, (don’t use this type in a fast timer or on tick event, it’s too slow for that)>
Get all actors and Get a copy to reach one in the list.
In this case, there is only one in the list, since I only have 1 barrier actor in the scene, so no need to figure out which, just take it.

It’s simple, a little dirty, but it works.

351320-dropbarrier3.gif