Really great, but I'm honestly most impressed by this page.
Twerp - Script for GMS2
Twerp is an easing function for GameMaker Studio 2 that functions similar to the lerp() function, but allows you to select from many easing algorithms to augment how the value changes over time.
Here is how I typically use twerp:
You need 4 things to start, often defined in the create event.
1. A start value.
2. An end value.
3. A length for the transition from start to end (typically in steps)
4. And a timer to keep track of how long the current transition has been going.
So my create event might look like this:
timer = 0; length = room_speed * 2; start = 50; end = 150;
Then my Step Event:
timer++; x = twerp(TwerpType.inout_cubic, start, end, timer / length);
And it's really that simple.
Click download now to get access to the following files:
- New Update with optional argument: loopingOct 26, 2021