Cant decrease an int?

For some reason I am not able to decrease an int.

when I run the program and press the button it doesnt decrease the int. I am printing the int every tick but it still remains the same number.

make print string from input itself, to check if input is working, maybe that’s the case.

Make print string after set node. The input action reveal probably doesn’t fire.

I made a print string every tick, and before that, I connected the print string after thecount decrease. Non of them show that the count has been decreased

I think it has something to do with that I am using the same input button in level blueprint as well?

Okay I removed the function from my fps player and put it into the level blueprint and now everything works fine. Can anyone explain me please why cant I use the same input button in 2 different blueprints?

ah, well when you click input event, you can see checkbox in the details panel, at right side

230350-screenshot-21.png

you should just uncheck override parent binding, and consume input, because level blueprint is more parent, than the actual player, thus it will block your input, if there is input already there, if you uncheck those, they both will fire.

Thank you sooo muchhhhhh!!!

Well as i said before, consume input checkbox prevents the lower actors to handle the input, so your level blueprint is more prioritized to use the input, you should uncheck it everytime you add new input event, if on both level/player/other actor, it is disabled, it will work on all of them

no problems mate