Hey there! (:
I will give you a detailed answer. Maybe this helps you in the future.
awilliams1701 already said that the counter is local on the coin in your setup. This will only
count how many times the same coin was picked up. Since you destroy him, this will be “1”
and the number will be lost due to the destruction.
What you really want to do is saving the number in a variable that belongs to something that is not
destroyed. This could be the Level Blueprint, but Level_Blueprints don’t like to be accessed through
Casts so easily. So for the beginning, we will take the Character.
Let’s say your Character Blueprint is called “MyCharacter”. Open it up and create a new variable called “CoinCounter” of type Int. Click the icon on the right side (the eye) to make it public (so it can be accessed by other classes).
http://puu.sh/dsiy8/14affa1112.png
Now compile the MyCharacter Blueprint and head over to your Coin Blueprint. Setup the Event Graph like this:
http://puu.sh/dsiHO/ab225a2eb2.png
Get the Player Character (0 if you have a single player game) and cast it to your CharacterBlueprint Class. Mine was “MyCharacter”. Now you can set and get the CoinCounter variable from the return output of the Cast Node. Remember that you need to compile your MyCharacter Blueprint first. Otherwise the new variable won’t appear. Also make sure to make the variable public. This is needed in UE 4.6 and higher.
If you can’t find the correct Cast Node, make sure you clicked “Context sensitve” at the top right corner of the menu that appears if you right click into an empty space of an event graph or if you pull an output into an empty space.
If you still have questions, feel free to ask me. But since it’s 2 am in germany, i will answer your tomorrow (: