Page 1 of 1

Ladder?

PostPosted: Mon Feb 20, 2012 7:56 pm
by Lacotemale
How does one make a ladder that works?

I want to make them work for my (work in progress)game: viewtopic.php?f=4&t=9509

I also need to get a walking animation working but ladders are more important to me right now. :)

+1 for anyone who helps me! :wink:

I should mention that I have already attempted this using yvelocity++; and yvelocity--; ... in my mind one of these should have worked!

Re: Ladder?

PostPosted: Mon Feb 20, 2012 9:11 pm
by SuperSonic
Put this in a collision event with your player and the ladder. Set it to repeat :wink:
Code: Select all
char * key = GetKeyState();
if(key[<put the key ID you use for climbing here>])
{
    y -= <put a number here>;
    //Do any animation changes you need here
}

Hope that helps :D

Re: Ladder?

PostPosted: Tue Feb 21, 2012 12:50 pm
by Lacotemale
Thanks alot! Why was I using yvelocity when all I had to use was y-=?! LOL :roll:

Silly me! :D +1 for the help anywayz!

Re: Ladder?

PostPosted: Wed Feb 22, 2012 12:07 am
by SuperSonic
No problem :wink: