Air walk remover with explanations and links

[Reusable] Air walk remover with explanations and links 2021-05-07

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 or player.mo.state == S_PLAY_WALK or player.mo.state == S_PLAY_DASH) //and he plays the walk, run or dash animation.. //https://wiki.srb2.org/wiki/List_of_states
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: 15
  • srb22137.gif
    srb22137.gif
    1.2 MB · Views: 17
Author
Kirb
Downloads
150
Views
560
Extention type
wad
File size
947 bytes
MD5 Hash
47225c747d2b242a1c7f7d537c9bd857
First release
Last update
Rating
2.00 star(s) 1 ratings

More resources from Kirb

Share this resource

Latest reviews

Alright, after thinking it over, this may be helpful to some folks, I'll let it in.
Upvote 0
Top