After pressing keyboard I get in flow two variables - please help me how to solve this problem

Hallo I am creating some script and I need increse variable after pressing button. So I map Action in settings “Slunce” after pressing key F. But all the script doesnt work because I got two variables - one is correct and second is the default value. In this example you can see what happend after I press 18 times key F. Can somebody help me? I already spend on it many hours and I dont have idea how to solve it.

Action mpping in input:

Blue prints:


Printed string: - two values 0 - is default float setting, 18 is after 18times pressing key F
18x_press_F_01.jpg

thanks for your help!

Remove your print string and see if it really is the thing that’s printing the 0s

Thank you for reply! Blue prints realy calculate with both values - if i put there other functions it have strange behivior ones it calculate with first number of variable (for example 0) sometimes with second number (for example 18) :S Or maybe I didnt get your advice.

Do you have two instances of whatever this BP is in your map?

…just one

Are you sure you’ve set that player to be posessed, and when you start the game, another one isn’t being spawned?

Is your number of players set to one?

I dont know where to check or set it? I have just one spawn in there.

Sorry I dont know how to set or check this …

It is set here, but if you don’t know how to set it then it should be set to Play Offline and to 1 Player
.

Thanks for tip. It is set to one player :confused: :frowning:

I did this as you sugest … THANKS A LOT!! NOW IT IS WORKING!!!
posses.jpg
FINALY!

Glad it’s solved Unreal has a lot of initial options to look through to make sure everything is working.

When in doubt, it’s likely not a problem with the logic you’ve set up! :smiley: