Destroy actor causes graph flow animation to stop and causes issues

I want to make a pick up system where the player will collect an actor (an apple) and then when they do this, it will destroy the actor (the destroy node is located in the third person character blueprints):

After that, a set score of hunger will be provided to the third person character (the score is given through the blueprints for the apple actor):

With multiple instances of this actor I have an issue where the last apple that is picked up/destroyed, a set score of hunger will not be given it will only be destroyed. When I tried to debug this in the blueprints, the graph flow animation will stop and all the links will turn white, bypassing the hunger node addition entirely, as well as a print string I added at the end for testing. I have a similar issue with another actor. I am not sure if this is a bug with the engine or something I haven’t done properly in the engine. Any help would be appreciated. Thanks!

your question isnt easy to follow and your implementation isnt entirely clear, are you adding the apples to an inventory or are they being applied/ eaten immediately? you also only show a portion of your script so its hard to tell what happens in your apple bp.

assuming that the apple is consumed immediately i would put most of the script in the apple bp so that theres less clutter in the character and its easier to understand. personally i would use a setup like the following picture. the script in the picture does basically the same thing as yours does from what i can tell but its all contained in the apple bp. the way it works is when the apple overlaps something it checks to make sure its the player character, then if the player presses the E key the script is run. so if overlap player the gate opens then is player presses E key the execution will pass through the gate and fire the rest of the script. from there it casts the player character to a given class type, in this case i used the third person character (this is so we can have access to the variables the class contains). so from here were get the hunger value and do one of two things depending on if its beyond a threshold, if hunger = 0 then the character isnt hungry so we just print the string not hungry, if the hunger level is above 0 then we consume the apple and reduce the hunger value. to reduce the hunger value we just need to get the hunger variable from the character again the subtract the value of the apple (so apple reduces hunger by 10 or something), then we need to clamp the value so it stays within the range that we want (good for if you use a progress bar to show hungers value), and finally we set the value of the hunger variable. the final step here is to destroy the apple.

if we use a setup like this that doesnt call any functions on the character then it also eliminates any issues that may arise from the rapid pickup of apples.

I think the issue is that your event EndOverlap is still setting your ‘Subclass Apple’ variable to the last seen apple. When you end the overlap did you intend to remove that connection?

I apologize for not explaining the issue in a more easy to follow manner. The apple is consumed immediately so I will follow your solution and let you know.