Download

Got 5 specific coins and then something happens in the level

I have test a lot of codes, but I can´t get it right. In the course I have to get five coins for exampel and when I have this five something will happen. Can anyone tell me the code for this?? Thanks!!

Hi @chilla7
You are using the word “Specific” so i guess that you have a lot of coins but you need to make difference between getting These coins and the others…

If you are using the same actor con, you can still give different value to that using a value or using a tag.
So when you collect a coin, you have to add a couple of if:
if the coin actor have a value - A - than add +1 to coinA value…
if the coin actor have a value - B - than add +1 to coinB value…
Same using Tags
if coinactor have tag - normal, add 1 to normal coin counter…

every time you get a coin check if you have 5 of them and if yes, run the event you need.

This coins are just 5 in total and from the same Blueprint Actor with the same code.