Create the CoinsCollected variable in Player Controller, Game Instance or Game Mode BP. Those are some of the BP’s that you can easily access from any other BP(i.e. Get Player Controller > Cast to yourplayercontroller > Get/Set CoinsCollected) Then you can get and set the variable in your coin BP and then get it in your GUI BP to display.
I am working from the rolling template. I added the Coins Collected variable to the RollingGameMode.
I then tried to do a get coins collected but I can’t seem to get it. http://prntscr.com/8q8wbx
It doesnt because you arent firing the Cast node in the screenshot, and you also need to Get that variable so that you add 1 on top of it with every overlap event and then set it with the result. Like so:
I’m using the player controller here but you can use the Game State(correction to my earlier post: use Game State instead of Game Mode) If you use Game Instance the information is saved between levels so consider that as well.
Have you tried using a variable of the class instead? And experimenting around with that? Also I got a good laugh out of the string in the print node on cast failed
I made some adjustments to the gamemode and now it will let me set the variable in GameMaster and the blueprints can access it but for some reason my GUI isn’t updating - http://prntscr.com/8qgcgz
Glad you enjoyed the cast failed
Try creating a custom event that fires after the coin is picked up, and make the event tie into the show hud blueprint (like where you are firing every time you start game) make it remove the HUD and re-add the HUD to the viewport. It should work but it might be pretty hefty in performace, I’m not sure