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 …
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
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:
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.
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