The Daily Click ::. Forums ::. Klik Coding Help ::. PMO and ladder
 

Post Reply  Post Oekaki 
 

Posted By Message

Rory Griffin



Registered
  14/08/2003
Points
  239
25th April, 2009 at 08:46:07 -

Okay, I'm trying to get it where my PMO object can climb up a ladder and on top of a jump-through platform (which will be part of the platform above the ground). When the object climbs the ladder, he can go through the platform, but when it comes to climbing down, he won't go through. Does anyone know a fix for this?
Download here:
http://sites.google.com/site/visagegames/home/project-z

 
n/a

Chloe Sagal

under the influence of FUN

Registered
  19/02/2009
Points
  607

Orange
25th April, 2009 at 09:40:20 -

my engine uses the PMO for the player and does have a latter, so ill give you the gyst of how i did it. (it may not be the best way, but i have nothing really to compare it to so meh) its alot different than your current engine (which looks like the tutorial version, if im not mistaken? i could be wrong, let me know)

well, first you need two groups, one of (call it ladder movement or something) them needs to be thrown in the other one (ladders general or something) and is not active on start.

you need to have a condition to all your players normal movement commands have the condition "when ladder movement is not active". (especially the jump through platform event)

now, with the conditions you currently have for the ladder, put both of them (i dont think you need the third one, you might as well delete that one [the one with the collision test]) in the ladders general group, copy it and paste them in the ladders movement group. on the two in the general group, add the "when ladder movement is not active" condition, and have those events activate the ladder movement group. you can throw the set velocity to 0 conditions into the ladders movement group aswell.

in the ladders group, you need triggers to make it so the player can get off the ladder. the first one is "player collides with backdrop" close group. the second, should be if the player presses left, or presses right and is not pressing up or down (you could change it to whatever you want, but thats just the one im using). then the third needs a new object, just a single pixel x axis line, call it "ladder top" and place it on where towards the top of the ladder on the ground. "when the player y is lower than ladder top - (however many pixels from the bottom of the player to his head), close group.

i took the time to organize your code, delete unnessessary code, and put the engine in to full effect, the only issue the engine has, however, is that if you jump off a ladder while you are overlapping the jump through tile, the player gets does a dance. there are also a few other tidbits i didnt describe on here, make sure you catch them.

http://rapidshare.com/files/225497847/Application.mfa.html

 
Patreon: http://www.patreon.com/chloesagal
Twitter: https://twitter.com/ChloeSagal

Rory Griffin



Registered
  14/08/2003
Points
  239
25th April, 2009 at 14:11:56 -

Thanks a million! Now, is there a way to where the active doesn't make that sudden jump in distance when starting up or down the ladder?

 
n/a

Chloe Sagal

under the influence of FUN

Registered
  19/02/2009
Points
  607

Orange
25th April, 2009 at 15:59:41 -

oh yeah, totally. if you have an animation that moves the player onto and off the ladder, thats the cutoff point for it to look realistic (then the change in the ladder movement on and off could be done after each animation is over) but for the sake of simplicity there are two numbers you need to mess with. the first one is in the actions in conditions to enter the ladder movement group if the player presses down, the action "set player y to y of ladder top". the second is in the ladder movement group in the conditions "when player y is less than y of ladder top" change that to "y top - 33" and delete the "set player y" action. thats about it!

 
Patreon: http://www.patreon.com/chloesagal
Twitter: https://twitter.com/ChloeSagal
   

Post Reply



 



Advertisement

Worth A Click