Game Development Community

Clinging to the ceiling

by Prominence · in TGB Platformer Kit · 12/17/2008 (7:34 am) · 2 replies

Hey, right now we (that is to say me and a few friends) are trying to make a behavior for a player character where if you jump, then hit the spacebar again when he's in midair and just below a ceiling, he'll stick to it. We're not sure how to go about doing that, however. Any help, please?

#1
02/05/2009 (2:56 am)
You'll have to mess with the engine collision code quite a bit. You'll have to somehow designate certain objects as "ceiling", for example. Check out Stupid Vehicle Tricks resource for may be a little help with this--but only as a clue.
#2
02/11/2009 (9:48 am)
I'd take a look at the ladder code and edit it so you can move left and right instead of up and down. Then for the ceiling I'd place a trigger box along it. When the player pushes up it plays an animation of him clinging to it. Then as you move left and right there's an appropiate animation for that.

I'm writing up my own platformer test game right now, after I'm done I could revisit this and put something together for you.