how can i set the speed of the custom movement behaviour to global variable?
The idea is if frame is at ... set jumpstrength to ...
I also use the custom movement behaviour, so if the jumpstrength is 1000 (example) than set the custom movement speed to 500 (example) i want to do this with a global variable or a instance variable... so i set the value to the count i want... but if i set the speed to the instance or global variable it doesn't do anything...
Anyone a solution?
global var jumpStrength = 0
global var frames = 0
-- Add to: frames: 1
-- Set value: jumpStrength: frames / 60
This will increase the jumpstrength in a linear fashion by roughly 1 unit per second indefinitely.
Develop games in your browser. Powerful, performant & highly capable.
gumshoe2029 if you want to increase a value of 1 unit per second and want to be framerate independent, your formula must be:
-- Add to: jumpStrength: dt