Thanks so much for the help here! Okay so I’ve moved my increment score function over to my GameMode blueprint, how do I access the score value itself from GetGameMode? Am I going about this properly! Still very new to the system, hope I’m not taking too much of your time here.
Ah okay that makes sense. Should I be running the exec on the casting via the Event Tick? That’s how I have it set up at the moment, but still the UMG TextBlock remains at zero (I have the text content binded the same as I showed in the earlier image)
The bind should be either at the first time you run your UMG script storing it in a variable or you can very well do it every tick right before you show the number.
Remember to get the result of the cast to set it to your local variable or use that result to get your score from it.
Ah this won’t work since you’re setting the text only when you call “Event Construct” and not during the tick.
Try using the “Cast To MyGame” during “Event Tick”.
You either have to set your “score tracker” variable at the beginning with the result of this cast or do it repeatedly but you can’t just get the number during the construction
I think I’m doing that properly but still not getting an update. I’ve decided to scrap the UMG binding and just use the “Set Text” node instead. Still no update though.
Many thanks Erasio!
Are you sure you set your “Score Tracker” variable?
Maybe you should try using the “Set Text” function behind the cast pulling the object directly from that node. You could also get around the “Current Score” text variable.
I haven’t done a set node on the Score Tracker, I didn’t know I had to do that. What would I be setting it to / why is it necessary? Also re-organized without Current score variable:
Thanks!
You are using the “Score Tracker” variable to call your “Set Text” function.
Right now your “Score Tracker” variable is empty meaning the Editor will throw an error because you try to call a function of “none”.
Basically you’re trying to fill up a bucket but you only have a piece of paper telling you where to find the bucket. However someone forgot to write down where it should be so you just hold that piece of paper under the flowing water which seems to not be too effective.
A bit embarrassed now: just realized I had been running off the wrong value. I’ve been working from my original blueprint value from before I moved over to the game mode blueprint. Finally got it working! Erasio, you are my hero <3