Formular maths insted of tween, how can I use math formulars in values to increase a value over time. I.E value will go from 1 - 2 over 1 second ?
thanks
On Every Tick: set var to (var+dt)
Or if you want it to not go over 2:
set var to min(var+dt, 2)
Develop games in your browser. Powerful, performant & highly capable.
How would I in the value go
Set value for 1-4 every tick (dt) but stop at 4 ?
Your answer I’m just finding a bit confusing soz cus what would var be ?
Would I be
(1+dt, 2)
As construct just says no to that in the layout scale parameter
"var" is a variable name. You need to store the value somewhere - you can store in a variable.
Global Variable var=1 Every tick: Set var to min(var+dt, 4) Set layout scale to var
This will increase var (and layout scale) from 1 to 4, over 3 seconds.
You can do this without a variable of course:
Every tick: Set layout scale to min(LayoutScale+dt, 4)
I suggest you use Tween behavior instead, it's easier, you can specify the time and target value, and you can choose a nice easing effect.