Increase variable by 1 in BP

Hi all,

Can someone post a quick screen snip of increasing a integer variable by 1? Taking its value, and increasing it by 1. i++. That is what I want, I just can’t seem to make it work visually.

I can set it, but it ignores the existing value.

Thanks,

1 Like

“Combo count” is just an int variable .
"Attack " is just a key i made .

Perfect - thank you . I think my main mistake was trying to combine the setting and getting of the old and updated variable in one branch. Your two branches make sense - I still have to get used to being able to follow a branch to the left as I continue to “program”.

Thanks,

Look under “Math”-> then “integer” –> “integer + Integer” node is the one you want. If you are using a float, replace integer with float. :slight_smile:

*Edit - Whoops, looks like you posted an answer just as I finished typing… Glad it works!

There are IncrementInt IncrementFloat now

4 Likes

is a four-year-old post buddy.

But hey, people Google stuff. It doesnt matter if its 4 yars old for the original poster or not, the Googlers will benefit from the upgrading of info. topic for example has 6000 views, while the new topics in category have like 6 views. When the information is something that is sought for, -simple or not-, upgrading the information is very much appreciated by the ones looking for it. And is probably why the post was made as well.

And appreciated by me as well… I am still using the old 4 years old method, even though I got UE4 the very first week it was released. I am just lazy reading the news and upgrades…

7 Likes

Just googled in 2020. Thanks!

2 Likes

2022

1 Like

Just used in December 2022 because my Unity prof is an idiot. Get lmao’d on, ixi

2 Likes

Used in 2023, I was looking for the increment integer/float nodes but didn’t know what they were called. Thanks!