Able to access functions from reference class but not variables

Hello. I’m new to Unreal, and I’m trying to create a countdown timer following this YouTube Tutorial, specifically the part starting at 7:20. I have a game mode class with a seconds variable that I will use for my countdown timer. Here you can see that I have an int variable named Seconds in the game mode class:

Here you can see that I made a reference to this game mode class and set it as a new variable just like it says to do in the video tutorial:

And then I get to this point where I am trying to use the Seconds variable but I cannot find it when I come off of the BP Game Mode Ref get node. I can find functions that belong to the reference class but no variables. Here is a Function I can access:

But here’s me trying to find the Seconds variable, which is under the reference category (entering it in the search bar brings up nothing):

As you can see, there is no reference section listed under the Variables category.

What’s going on here that I can fix? I’m guessing its something so obvious that I’m the only one who would even need to bother to ask, but I’m very new and so here I am.

IMO
Dont use tick with a delay… use an event with Set Timer by Event | Unreal Engine Documentation

Use this when int == 0 to stop timer → WTF Is? Clear Timer in Unreal Engine 4 ( UE4 ) - YouTube

Use Division (whole and remainder) | Unreal Engine Documentation to get minutes and seconds. You only need 1 int variable with the total time in seconds: WTF Is? Modulus/Modulo/% in Unreal Engine 4 ( UE4 ) - YouTube

You need to cast to get events and variables from game mode:

This is the event in game mode working with a timer:

This is the output every one second:
image

Also… in the widget rather than using bind, push the updated value to the widget blueprint from the game mode.

1 Like

Here’s the explanation why not bind in this case: Epic Developer Community