Change in value of a variable according to the rise or fall of another variable.

Good morning all;

I come back to the subject of my last post, changing the title and form of the question.

I would like to know how to make one variable change based on the continuously increasing or decreasing of another variable.
For example :
When A increases from 1 to 5, B decreases from 6 to 2, or vice versa …

thank you in advance for your answers

Hi @Phylogenius

Well you just build an expression with your needs!. here some stuff
For example,
Get_Var1 (multiply float) ( -1) Set_Var2 /////////// the variable are opposite, so if one is 25, the other is -25 !
Var1 *0.5 clamp-(5) (50) set_var2 ////////////////// the variable 2 will be the half of var1 , but always at least 5, and max 50.
You can add , subtract, mutliply and vidie, and clamp , and truncate …using nodes you can build the perfect fit for your variables.
For more complex behaviour you may want build equations !
and here there is a page about that

Thank you for your answer.
Do you have a visual example, please.

This should be the perfect example,
Here the link https://www.raywenderlich.com/5246-u…render-targets


As you can see here this tutorial, link the AxisValue to the Brush Size, using of course some nodes for multiply, add, and clamp , and set the end value.
You can plug any variable inside the first X10, instead of the axis value, and … well… basically you can plug variable wherever you have the right kind of pin-Variable.

PS:Maybe the renderstuff is to complex, but you can use the mouse input, to move a cube, or anything else.
try something simple!

Thank you for this demonstration, as well as for the time you give me,
This is what seemed to me, there is an error on my question.
Here is more explicitly what I would like to obtain:

The arrow represents the relationship I lack for the Var 1 to serve as a pilot for the Var 2.

Here a very simple way of doing it. Maybe it will help you.

You could use a boolean to drive your script. For example let’s call this variable “Reverse” with default value false.
So when Reverse is false Var1 + 1 and Var 2 - 1, for Reverse true Var1 -1 and Var2 +1
You check for min/max values for your variable (or clamp). Check only one as they are tied together anyway.
When your variables reach their values, flip the setting on Reverse boolean to go the other way.

Aid links below.

Thank you DonBusso, I remember your idea, it will certainly help me.

God bless you

the lower part of your screenshot literally say:

When the Event RechargeEnergie is called do the next node
The Branch ask: : is this condition true Do this nodes, –
Is this condition false Do this nodes –
If was yes, you Set the Variable 2, to Variable 2 +1.

The lost part is Variable 1+1. that not return a condition true or false.
in the search node type int == int > not and
you will get 4 nodes, some of them can be found for any type of variable

Here a simple video about start https://www.youtube.com/watch?v=opsv5wTLcz8

for example, you can check if that variable is X
if is lower than X, greater than X
here the node Greater_or_egual https://docs.unrealengine.com/en-US/BlueprintAPI/Math/Integer/integer_gt__integer/index.html
If you use this node you can check if the Var+1 is greater than another number.
You can combine these conditional stuff in any way.

Search online for starting operation with And , Or, Not, and Equal

Thank you, I am taking all of this as notice.
I solved my problem, the solution can be found here :
https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/1819403-increment-in-time

God bless you