Overriding the glide ability in CA_GLIDEANDCLIMB?

JustHenbo

Member
I have an idea for an Espio character mod that has the ability to walk on walls and the ceiling.

I thought about using CA_GLIDEANDCLIMB as the primary character ability to simplify the process, as I am fairly new to coding, and somehow over-ride the the gliding part of the ability with a Lua script. Would such a feat be possible? Or would I have to rewrite the climb aspect as a new ability?
 
It's definitely possible to commandeer the base character abilities.

Code:
addHook("AbilitySpecial", function(player)		--"AbilitySpecial" hooks when the "player" tries to use their jump+jump ability
	if player.charability == CA_GLIDEANDCLIMB	--check the player's ability
		return true				--true: "don't run the rest of the ability code"
	end
end)

This would stop the gliding from working... though you'd need an additional check for walls or otherwise it also stops the climbing from working. Wall checks like that are unfortunately above my Lua level, but maybe someone else will chime in to help with that.

I kinda wanna know what'll you do with the sprites, though. It's gonna take a bunch of them.
 
Thanks for that snippet of info! I'll give it a quick test and see if it does affect the climbing ability, but I suspect that it might from your descriptions of the code.

EDIT: Just realised I misread what you said about the additional check for walls. Like you said, hopefully someone will chime in with that information!

I kinda wanna know what'll you do with the sprites, though. It's gonna take a bunch of them.
My initial idea for "climbing" the wall is basically a top-down view of him walking. But I haven't looked too closely at the amount required to fully animate the ability yet.
 
Last edited:

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

Back
Top