on the animation finish event of "UP"(ladder climbing animation)
- Code: Select all
af = 0;
make another variable called CLIMB
and use this code for the repeated collision event of the player colliding with the ladder(add this for the player)
- Code: Select all
char*key=GetKeyState();
CLIMB = 1;
if(key[KEY_UP] == 1)
{
if(af == 0) {
af = 1;
ChangeAnimation("Event Actor", "UP", FORWARD);
}
y -= 3;
}
and for your draw actor event that has the gravity stuff,
- Code: Select all
if(CLIMB == 0)yvelocity += 1;
and on collision finish event of the ladder,
- Code: Select all
CLIMB = 0;
(I did a redo of the code here)