Game Development Community

Ledge Climbing

by Chase Fellhoelter · in Technical Issues · 12/10/2007 (6:24 pm) · 8 replies

I am using TGE 1.5.2 and my end goal is to have the player latch onto a ledge using a key press while in midair in order to animate himself climbing up and be able to continue moving once on top of the ledge. I have managed to mount the player by pressing "." and then play an animation using %col.schedule(1000, "playThread", 0, "climbLedge"). But I am stuck there. How am I suppose to unmount the player where the animation left off and allow the player to continue moving like normal? Does the mount point have to be repositioned according to where the animation leaves off or what?

Aside from getting on top of the ledge, I would also like to allow the player to shimmy across a ledge. Once the player is mounted, would a new actionmap be added? If so, how would you limit the player's direction on the ledge and use the correct animations?

I appreciate any help you can offer and if you have a better idea I am all ears.

#1
12/10/2007 (6:41 pm)
I would do an "onStopSequence" thing and then do the unmount junk.
#3
12/11/2007 (7:42 am)
Nathan, I have already implemented that. The character is really just walking with a different animation. I need the character to be able to hang from the ledge, and then climb up at the press of a button.
#4
12/13/2007 (2:00 pm)
So, not climbing, put pulling yourself up a ledge?
#5
12/13/2007 (2:16 pm)
Correct Nathan. I need my player to pull himself up on the ledge once he is hanging from it. And then he needs to unmount from the point after the animation.
#6
12/15/2007 (2:24 pm)
Couldn't you just mount the player to a node on the wall, and when the player presses the up arrow (or whatever) then play a climbing animation, dismount the player, and use vectors to set the players transform?

You would have to change the action map to something like
function upArrow(%val) {
if (commandToServer('isClientOnWall') && %val)
   commandToServer('dismountFromWall');
else
   $MvForwardAction = %val;
}

function leftArrow(%val) {
if (commandToServer('isClientOnWall') && %val)
   commandToServer('leftOnWall');
else
   $MvLeftAction = %val;
}

function rightArrow(%val) {
if (commandToServer('isClientOnWall') && %val)
   commandToServer('rightOnWall');
else
   $MvRightAction = %val;
}

function downArrow(%val) {
if (commandToServer('isClientOnWall') && %val)
   commandToServer('dropFromWall');
else
   $MvBackAction = %val;
}
#7
12/15/2007 (2:32 pm)
...That is pretty much the same thing I said up a bit.
#8
12/16/2007 (4:24 pm)
Quote:I would do an "onStopSequence" thing and then do the unmount junk.

That means nothing to me, definitely not "Couldn't you just mount the player to a node on the wall, and when the player presses the up arrow (or whatever) then play a climbing animation, dismount the player, and use vectors to set the players transform?"