Ladder object
by Harrison Brock · in TGB Platformer Kit · 03/13/2008 (3:07 pm) · 2 replies
Hello,
I'm able to make a object work as a rope(going up/down). But I'm not able to make it work as a ladder. As when you get to the top of the ladder you can walk on the platformer.
I'm able to make a object work as a rope(going up/down). But I'm not able to make it work as a ladder. As when you get to the top of the ladder you can walk on the platformer.
Associate Phillip O'Shea
Violent Tulip
Find and comment out these lines:
// If we're above the top of the ladder, clamp our position if (%actorMin < %ladderMin) %this.Owner.setPositionY(%ladderMin - %this.MaskMin.Y);Then find the function "ActorBehavior::updateOnLadderPhysics()" in the same document.
Find and comment out these lines:
// Make sure we're not trying to move above the top of the ladder %playerTop = %this.Owner.Position.Y + %this.MaskMin.Y + %this.MoveSpeed.Y * $Tick; %ladderTop = %this.LadderObject.Position.Y - %this.LadderObject.Size.Y / 2; if (%playerTop < %ladderTop) %this.MoveSpeed.Y = 0;This should allow you to move above the top of the ladder. Let me know how you get on.