Lua Help: Climb w/o Glide

Status
Not open for further replies.

Dimpsuu

Dimpsy
So I was trying to make the ability to be able to climb walls like Knuckles only without needing to glide and instead just double press the jump button to climb a wall if possible... but I'm having slight problems getting this to work.

Here's the code if you'd like to help, that would be nice.
addHook("ThinkFrame", do
for player in players.iterate
if player.mo and player.mo.skin == "sonic"
and not (player.pflags & PF_NIGHTSMODE)
if player.mo.oldmomz ~= nil and (player.mo == player.mo.wall) then //Used to check if Sonic is touching a wall
player.charability = CA_GLIDEANDCLIMB
end
end
end
end)

Thank you in advance.
 
As far as I know, oldmomz and wall are not valid variables. I'm still a newbie at Lua, but I don't see either anywhere in the documentation thread.
 
Last edited:
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top