The Daily Click ::. Forums ::. Klik Coding Help ::. ladders with the pmo....
 

Post Reply  Post Oekaki 
 

Posted By Message

siven

I EAT ROCKS

Registered
  03/11/2008
Points
  604

Wii OwnerVIP Member
27th July, 2009 at 23:53:15 -

how can this be done? ive tried a few ways and always mess up, so ive come to you good people for help.... what is the easiest and simplest way to make a ladder using the pmo?

 
[Game design makes my brain feel like its gonna explode.]

Strife

Administrator
Der Dairy Crick

Registered
  21/11/2002
Points
  2305

VIP MemberGOTW AWARD! -Astro Dude - part 1 GOTM JULY - 2009 - 3RD PLACE!It's-a me, Mario!Has Donated, Thank You!I donated an open source project
29th July, 2009 at 21:57:07 -

You mean Platform Movement Object, yes? If so, I actually figured this out last week. It's a bit tricky to explain, but i'll try my best.

Start by building your ladder, and be SURE to set its collision settings to Collision with Box. Then create a "Ladder Top" object that's exactly as wide as the ladder itself. Place the Ladder Top object so that its top edge is overlapping the top of the ladder, like so:

Image

Make sure that Ladder Top is invisible during the game.

Next, if you haven't done so already for something else, create an active object that is a small square. I'll just call it "Bottom of Player". Make it invisible, and set its position so that it's always slightly below the player's collision mask (so that "Bottom of Player" bleeds through the floor a little while standing on the ground).

From here, you have everything you need to program the ladder using your game's engine. You can make a condition using the Storyboard Controls object (the one with the chessboard icon) to detect whether or not the center pixel of the player object is overlapping the ladder, and when it is (and while the player is holding down or up), you can snap their X coordinate to the X coordinate of "Ladder Top", temporarily disable gravity and X velocity, and allow the player to move up or down. Using the "Bottom of Player" object, you can detect when the player is touching the ground so that you can start the normal physics back up again, and you can do the same when you've detected that the player is no longer overlapping a ladder.

That should get you started, but if you need more specific directions, i'll see what I can do.

Edited by an Administrator

 

siven

I EAT ROCKS

Registered
  03/11/2008
Points
  604

Wii OwnerVIP Member
31st July, 2009 at 03:11:18 -

lol wow, that is far more complicated than i though, i was already trying something with the detector and the block at the top of the ladder, but i kept doing it wrong, thanks a ton!

 
[Game design makes my brain feel like its gonna explode.]

Strife

Administrator
Der Dairy Crick

Registered
  21/11/2002
Points
  2305

VIP MemberGOTW AWARD! -Astro Dude - part 1 GOTM JULY - 2009 - 3RD PLACE!It's-a me, Mario!Has Donated, Thank You!I donated an open source project
31st July, 2009 at 10:33:46 -

No problem!

It definitely is a bit complex... though it also has the distinct advantage of snapping the player directly to the center of the ladder, unlike the default platform movement in which players could climb up the far edges of a ladder.

 

siven

I EAT ROCKS

Registered
  03/11/2008
Points
  604

Wii OwnerVIP Member
5th August, 2009 at 06:04:27 -

no big deal, kinda wanted it that way

 
[Game design makes my brain feel like its gonna explode.]
   

Post Reply



 



Advertisement

Worth A Click