SRB2 Message Board  

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

Reply
 
Thread Tools Search this Thread
Old 3 Weeks Ago   #1
JustHenbo
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 3 Weeks Ago   #2
Goldenhog
Wandering Protagonist
 
Goldenhog's Avatar
Default

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.
__________________
Quote:
Originally Posted by Asagi Asagiri
I need power over the people! The stupid, STUPID people!
Goldenhog is offline   Reply With Quote
Old 3 Weeks Ago   #3
JustHenbo
Default

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!

Quote:
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; 3 Weeks Ago at 10:34 PM.
JustHenbo is offline   Reply With Quote
Reply

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 11:16 AM.


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