How to make a character attach to walls

MetalLord

  • Posts: 15
So guys,i'm making a game a game like lemmings with multiple characters walking from left to right without player direct control,i need a way to make the characters climb walls,walk upside down,always attached to the walls,i tried changing gravity but this affect every character I'm the scene,tried rotating upon collision with the wall but don't work.

Any idea ?

« Last Edit: March 21, 2013, 03:41:47 pm by MetalLord »

Ryusui

  • Posts: 827
Have your "lemmings" provide their own gravity.

Instead of using global gravity, equip each one with a behavior that pushes them downward every frame, and when they need to be climbing a surface, disable their "built-in gravity" as long as they're in contact with a wall.
In the event of a firestorm, the salad bar will remain open.

MetalLord

  • Posts: 15
It worked to climb walls,but i cant make the player glue to the structures

Something like this


I cant put invisible triggers because the stage is made by destructible pieces and can change.

Ryusui

  • Posts: 827
That "destructible environment" thing...are you using the Tile API for that?
In the event of a firestorm, the salad bar will remain open.

MetalLord

  • Posts: 15
No,the scenery pieces are all actors with rotation disabled.

MetalLord

  • Posts: 15
Maybe i can disable all the gravity and use some some kind of pathfinding with 4 way movement to glue to the walls ?

MetalLord

  • Posts: 15
<a href="http://pixelorgymedia.com/demo.swf" target="_blank" class="new_win">http://pixelorgymedia.com/demo.swf</a>

SpookyBurger

  • Posts: 82
What if you designed the game more like a top down game, and the player can only walk "up" if they're colliding with a wall.
Please try out my latest build of Patient 9 here.   http://www.stencyl.com/game/play/23179

Ryusui

  • Posts: 827
I cant put invisible triggers because the stage is made by destructible pieces and can change.

Well yeah you can. Just have the terrain objects generate them.

Also, is the little robot dude supposed to be pushing the scenery around?
In the event of a firestorm, the salad bar will remain open.