Apply Momentum

[Open Assets] Apply Momentum v1c

What permissions do you give others to modify and/or maintain your submission?
Modify: YES - Maintain: YES - I give permission for my entire submission to be modified by others or used in their own work. I give permission for my entire submission to be maintained by others as well.
Apply Momentum - By ThatOneCartridgeGuy
An Introduction to this addon!
This here lua addon is designed to give the player momentum by manipulating the player's current normalspeed based on their current Z position when on the ground. This, and an obvious speed cap to make sure you don't lose control of your character while moving at high speeds.

I would also like to add the fact that this momentum addon would have to be a callable function as long as you had copied the function itself, allowing for your custom characters to make usage of their own momentum.
How do I 'apply' the momentum?
Well, young one, all you have to do is call the "P_ApplyMomentum" command making sure to place brackets with the appropriate values within them.

Here, you can see a potential example that is also found within the lua file itself:
Exemplar code:
addHook("PlayerThink", function(p)
    if p.mo and p.mo.valid then
          P_ApplyMomentum(p, skins[p.mo.skin].normalspeed, 60*FRACUNIT)
    end
end)
How do I exclude a skin from using the momentum?

Use the new 'applymom' command as of v1c to exclude a skin from using momentum! Usage goes about the following:

- applymom 1: Apply to current skin​
- applymom 2: Unapply to current skin.​
Recommended addons to use with this!
Well, well, well... Looking for addons that I personally recommend to ya that make the experience better? You're in the right place! Here's some that I recommend:

- Run on Water
- Uncurl v4 (sfx update)
- Spring Recurl
To finish off
I coded this while I was a little ill and took the day off from having a normal life, so please do report any errors you see back to me. Well, that's all I gotta say really... Good day to you all!

Can someone count the amount of times I wrote the word 'momentum' for me?
  • srb20056.gif
    srb20056.gif
    7.7 MB · Views: 2,556
Author
ThatCartridgeGuy
Downloads
1,550
Views
7,459
Extension type
lua
File size
6.1 KB
MD5 Hash
9960f2ed9a4e776ec3f559012f524f03
First release
Last update

More resources from ThatCartridgeGuy

Share this resource

Latest updates

  1. == v1c Released! ==

    What's new? Use the new 'applymom' command to apply or unapply momentum to the current skin...
  2. == Oops... Still v1b ==

    Just a quick update to fix some oversights in v1b, nothing much.
  3. == Version 1b Release! ==

    Here are the key differences from the previous build: - It applies when the player is in their...

Latest reviews

I love this but the super form and speed sneakers are way too fast now tbh, so I'm gonna have to give it a slightly lesser score than I would
Upvote 0
This is the first time I've seen a Momentum mod add cap. It is a perfect customizable Momentum mod. But I must ask is it possible for you to add an optional Fade time?
Upvote 1
works fine. has similar problems to the momentum mod but i'll assume those are either unavoidable or intentional. would be 5 stars if the picture was an apple. appley momentum
ThatCartridgeGuy
ThatCartridgeGuy
Gosh dang it! I knew I missed out on SOME sort of pun there! Regardless, thanks for the review.
Upvote 0
Back
Top