HUD variable returns only its default value in a Blueprint Actor Class

Todor Tsekov
Fri, 18 Mar 2016 10:10:36 +0000
UI

Hello Unreal community,

My name is Todor Tsekov and I am developing a game with blueprints.
I have discovered the following problem. When I click a button in a widget I want it to set a integer value. Then I want to pass taht value to a BP(BluePrint) Actor class, where depending on the value of that integer I can run a function that I have created.

Here is the Widget and the variable:

Here is the Actor class(My custom event and the BeginPlay event) :

The problem is that when the value is passed it returnts its default value(0) but I need to recieve (5 or -5). I have used boolean in the beggining but I saw that there is something more than that and I switch to integer to find the error.
As you can see I am printing my results and I can see that strange event occuring, but I have no clue what is causing it(the reference works because is passing the default value of the variable, the buttons work and change the variable, but there is something in between that I am missing).

I found this article:

Unreal Engine Forums – 25 Nov 15

Passing variable between blueprint and HUD.

So, I have a HUD in which is textbox "Height". Whenever player will type something there I want to make it a variable and pass it to Mycharacter Blueprint. Thats my HUD blueprint https://i.gyazo.com/20305fb67b848546194867ebc2832881.png Now I...

where a guy has the same problem but the solution cannot fit in my case.

Please guys, help me.

1 post - 1 participant