Air walk remover with explanations and links

[Open Assets] Air walk remover with explanations and links V3

This is a mod that deletes the air walk, so when you go off a platform you play the fall animation, like that "outta here" Sonic Mania mod or (as i remember) like Sonic CD
it has explanations and links inside it, so you can change the mod as you like and learn how to use lua
here's the code
//air walk remover, made by Kirb, reusable

addHook("PlayerThink", function(player) //main hook //https://wiki.srb2.org/wiki/Lua/Hooks

if not(player.mo) then return end //do not execute the script if the player isn't in game, because it could produce errors (i don't think that there's a wiki page that explains this, after all it isn't that complex)

--if not(player.mo.skin == "sonic") then return end //do not execute the script if the player isn't sonic, optional

if not(P_IsObjectOnGround(player.mo)) //if the player isn't on ground.. //https://wiki.srb2.org/wiki/Lua/Functions
and (player.mo.state == S_PLAY_RUN) //and he plays the walk or run animation.. //https://wiki.srb2.org/wiki/List_of_states
and not player.powers[pw_carry] //and not on a rollout ball --https://wiki.srb2.org/wiki/A_CustomPower
player.mo.state = S_PLAY_FALL //it plays the fall animation //https://wiki.srb2.org/wiki/List_of_states
end
end)
  • srb22136.gif
    srb22136.gif
    2.2 MB · Views: 267
  • srb22137.gif
    srb22137.gif
    1.2 MB · Views: 357
Author
Kirb
Downloads
2,233
Views
5,404
Extension type
lua
File size
851 bytes
MD5 Hash
af4b1d16cbff7d24048f9d352aca63f2
First release
Last update
Rating
3.50 star(s) 2 ratings

More resources from Kirb

Share this resource

Latest updates

  1. V3 bugfix

    fixed all the bugs that have been reported
  2. fixed

    fixed bugs

Latest reviews

absolutely flawless and fixes the worst con i have against srb2
Upvote 0
Alright, after thinking it over, this may be helpful to some folks, I'll let it in.
Upvote 0
Back
Top