SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > Editing > Editing Help

Thread Tools Search this Thread
Old 07-21-2020   #1
JustHenbo's Avatar
Default Overriding the glide ability in CA_GLIDEANDCLIMB?

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?
JustHenbo is offline   Reply With Quote
Old 07-22-2020   #2
Wandering Protagonist
Goldenhog's Avatar

It's definitely possible to commandeer the base character abilities.

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"
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.
Originally Posted by Asagi Asagiri
I need power over the people! The stupid, STUPID people!
Goldenhog is online now   Reply With Quote
Old 07-22-2020   #3
JustHenbo's Avatar

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 by JustHenbo; 07-22-2020 at 10:34 PM.
JustHenbo is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 01:05 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.