d-soldier wrote:Automail10, if it's a tv-monitor, thats probably the problem...
Oman, you want it so he "can't" jump when her falls off a ledge (rather then jumping off the ledge)? Just add a collision-finish event for the player in relation to the ground, which has the same "canjump=0" statement as is included in the jumping keydown event.
Darkboy wrote:I think the collision finish event is the best way...
Darkboy wrote:I think this is the correct code :
if(yvelocity<=-3)canjump=0;
I think that code will work if that actor has more than "-3" of yvelocity in that keydown event...
if(yvelocity > 3)canjump = 0;
directional_velocity = 0;
if(pause == 0)
{
char*key=GetKeyState();
int spd = 4;
yrate += gravity;
if(yrate > gravity * 3)j = 1;
if(key[KEY_LEFT] == 1 && key[KEY_RIGHT] == 0)
{
dir = 0;
if(sw == 1 && sj == 0)
{
if(j == 0)x -= spd;
if(j == 1 && xrate > -spd)xrate -= spd / 4;
if(af == 1)
{
if(j == 0)ChangeAnimation("Event Actor", "HRL", FORWARD);
af = 0;
}
}
}
if(key[KEY_LEFT] == 0 && key[KEY_RIGHT] == 1)
{
dir = 1;
if(sw == 1 && sj == 0)
{
if(j == 0)x += spd;
if(j == 1 && xrate < spd)xrate += spd / 4;
if(af == 1)
{
if(j == 0)ChangeAnimation("Event Actor", "HRR", FORWARD);
af = 0;
}
}
}
if(j == 1 && key[KEY_LEFT] == 0 && key[KEY_RIGHT] == 0)
{
if(xrate < -.5)xrate += 0.5;
if(xrate > .5)xrate -= 0.5;
}
if(j == 1 && key[KEY_LEFT] == 1 && key[KEY_RIGHT] == 1)
{
if(xrate < -.5)xrate += 0.5;
if(xrate > .5)xrate -= 0.5;
}
if(sj == 0)
{
if(key[KEY_LEFT] == 0 && key[KEY_RIGHT] == 0 && j == 0)
{
if(af == 1)
{
af = 0;
if(dir == 0)ChangeAnimation("Event Actor", "HSL1", FORWARD);
if(dir == 1)ChangeAnimation("Event Actor", "HSR1", FORWARD);
sw = 0;
}
}
if(key[KEY_LEFT] == 1 && key[KEY_RIGHT] == 1 && j == 0)
{
if(af == 1)
{
af = 0;
if(dir == 0)ChangeAnimation("Event Actor", "HSL1", FORWARD);
if(dir == 1)ChangeAnimation("Event Actor", "HSR1", FORWARD);
sw = 0;
}
}
}
if(key[KEY_UP] == 1 && j == 0 && sj == 0)
{
ChangeAnimation("Event Actor", "HareJump", FORWARD);
sj = 1;
}
if(j == 1 && sj == 0)
{
if(xrate < -2)
{
af = 1;
sw = 1;
ChangeAnimation("Event Actor", "HareJL", FORWARD);
}
if(xrate > 2)
{
af = 1;
sw = 1;
ChangeAnimation("Event Actor", "HareJR", FORWARD);
}
if(xrate >= -2 && xrate <= 2)
{
if(yrate < 0)ChangeAnimation("Event Actor", "HareUp", FORWARD);
if(yrate >= 0)ChangeAnimation("Event Actor", "HareDown", FORWARD);
af = 1;
sw = 1;
}
}
y += yrate;
if(j == 0)xrate = 0;
x += xrate;
}
Darkboy wrote:Hi Boss(where are you going??I miss you..ha..ha..ha..)
Sgt. Sparky wrote:Darkboy wrote:Hi Boss(where are you going??I miss you..ha..ha..ha..)
what do you mean?
diormeh wrote:i found a glitch:
you seem to be able to destroy bricks from the side!?
Users browsing this forum: No registered users and 1 guest