I want to increase float variable by some value let’s say X. I can get the value of the variable, add X and then set is as variable value. There is an IncrementFloat block which increases the value by 1 (so X=1). Is there any block that does the same but for any specified value?
I think he wants the exquivalent to ++ but increase any number and set to the original variable without set.
You should create a function that gets the variable by reference (you can tick pass by ref in the inputs of the function:
and then inside the function set the variable you use as input with set by ref
cant be a pure function because needs get/proccess/set the variable like this:
you can note when a function or any node uses ref variables because the icon of the connection is a diamond instead a circle
I created my own BP function library with very simple math like that that helps a lot when BP programming
Thank you for the replies. I was mainly curious if I missed something or it’s not a part of the engine. Also thank you for comments regardin Pure Functions!